Giter Site home page Giter Site logo

phpcompatapi's Introduction

PHP Compat API

PHP Compat API creates an API to test PHP code compatibility against the PHP version that you configure. It uses the PHP CompatInfo library to determine the results. There is also a simple React based UI to test your files from.

Installation

Download the application files and set your web server to point to the app directory of the application. Copy config-sample.php as config.php and modify the contents to suit your needs. Make sure you have Composer installed. Run

composer install

at the project root.

API Reference

There is only one API endpoint: /api/v1/test/ and it only accepts POST. Upload one or more files to it. The files should be named "file[]".

License

GPLv3

phpcompatapi's People

Watchers

Aki Björklund avatar James Cloos avatar

phpcompatapi's Issues

Notices and a fatal error...

[22-Jun-2015 22:09:57 UTC] PHP Notice:  Use of undefined constant WCT_TEMP_DIR - assumed 'WCT_TEMP_DIR' in [...]/app/index.php on line 23
[22-Jun-2015 22:09:57 UTC] PHP Stack trace:
[22-Jun-2015 22:09:57 UTC] PHP   1. {main}() [...]/app/index.php:0
[22-Jun-2015 22:09:57 UTC] PHP Notice:  Use of undefined constant WCT_MAX_UPLOAD_SIZE - assumed 'WCT_MAX_UPLOAD_SIZE' in [...]/app/index.php on line 28
[22-Jun-2015 22:09:57 UTC] PHP Stack trace:
[22-Jun-2015 22:09:57 UTC] PHP   1. {main}() [...]/app/index.php:0
[22-Jun-2015 22:10:01 UTC] PHP Notice:  Use of undefined constant WCT_TEMP_DIR - assumed 'WCT_TEMP_DIR' in [...]/app/index.php on line 23
[22-Jun-2015 22:10:01 UTC] PHP Stack trace:
[22-Jun-2015 22:10:01 UTC] PHP   1. {main}() [...]/app/index.php:0
[22-Jun-2015 22:10:01 UTC] PHP Notice:  Use of undefined constant WCT_MAX_UPLOAD_SIZE - assumed 'WCT_MAX_UPLOAD_SIZE' in [...]/app/index.php on line 28
[22-Jun-2015 22:10:01 UTC] PHP Stack trace:
[22-Jun-2015 22:10:01 UTC] PHP   1. {main}() [...]/app/index.php:0
[22-Jun-2015 22:10:01 UTC] PHP Notice:  Undefined variable: key in [...]/app/api/class/class-request-handler.php on line 34
[22-Jun-2015 22:10:01 UTC] PHP Stack trace:
[22-Jun-2015 22:10:01 UTC] PHP   1. {main}() [...]/app/index.php:0
[22-Jun-2015 22:10:01 UTC] PHP   2. include() [...]/app/index.php:33
[22-Jun-2015 22:10:01 UTC] PHP   3. WCT\RequestHandler->__construct() [...]/app/api/index.php:26
[22-Jun-2015 22:10:01 UTC] PHP   4. WCT\RequestHandler->set_options() [...]/app/api/class/class-request-handler.php:19
[22-Jun-2015 22:10:01 UTC] PHP Notice:  Undefined variable: key in [...]/app/api/class/class-request-handler.php on line 37
[22-Jun-2015 22:10:01 UTC] PHP Stack trace:
[22-Jun-2015 22:10:01 UTC] PHP   1. {main}() [...]/app/index.php:0
[22-Jun-2015 22:10:01 UTC] PHP   2. include() [...]/app/index.php:33
[22-Jun-2015 22:10:01 UTC] PHP   3. WCT\RequestHandler->__construct() [...]/app/api/index.php:26
[22-Jun-2015 22:10:01 UTC] PHP   4. WCT\RequestHandler->set_options() [...]/app/api/class/class-request-handler.php:19
[22-Jun-2015 22:10:01 UTC] PHP Notice:  Undefined variable: value in [...]/app/api/class/class-request-handler.php on line 37
[22-Jun-2015 22:10:01 UTC] PHP Stack trace:
[22-Jun-2015 22:10:01 UTC] PHP   1. {main}() [...]/app/index.php:0
[22-Jun-2015 22:10:01 UTC] PHP   2. include() [...]/app/index.php:33
[22-Jun-2015 22:10:01 UTC] PHP   3. WCT\RequestHandler->__construct() [...]/app/api/index.php:26
[22-Jun-2015 22:10:01 UTC] PHP   4. WCT\RequestHandler->set_options() [...]/app/api/class/class-request-handler.php:19
[22-Jun-2015 22:10:01 UTC] PHP Fatal error:  Cannot access empty property in [...]/app/api/class/class-request-handler.php on line 37
[22-Jun-2015 22:10:01 UTC] PHP Stack trace:
[22-Jun-2015 22:10:01 UTC] PHP   1. {main}() [...]/app/index.php:0
[22-Jun-2015 22:10:01 UTC] PHP   2. include() [...]/app/index.php:33
[22-Jun-2015 22:10:01 UTC] PHP   3. WCT\RequestHandler->__construct() [...]/app/api/index.php:26
[22-Jun-2015 22:10:01 UTC] PHP   4. WCT\RequestHandler->set_options() [...]/app/api/class/class-request-handler.php:19

Errenous HTTP 500 (I think)

with

<?

echo "foo";

api/v1/test/ returns (sort of correctly) {"error":"Unable to parse the file."} but with an http 500 causing a console log event

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.