This is a simple web application skeleton project that uses the Slim 4 Framework:
- sebastianbergmann/phpunit as unit testing framework
- nyholm/psr7 as super lightweight PSR-7 implementation
- league/container as dependency injection container (PSR-11)
- monolog/monolog as logger (PSR-3)
- twig/twig as template engine
- odan/twig-assets for JavaScript and CSS minification and caching
- odan/twig-translation as translator
- PHP 7.1+
- Composer
- Download and extract the ZIP file: master.zip
- Run:
composer update
- Upload all files to the webserver
- Open the website
- You should see a message:
Hello, World!
GET /
=>Hello, World!
GET /hello/john
=>Hello, john!
GET /time
=>Current time: ...
POST /users
=>json response
Start unit- and API integration tests with:
composer test
Start unit- and API integration tests + full coverage report with:
composer test-coverage
The code coverage report (xml and html) output directory is: build/coverage
- MIT