A project skeleton in pure php. This skeleton can be used to prototype some simple services where the usage of a framework is over bloated.
There is two choices of running the application:
- php-fpm
- swoole
All those build by default as app
and app-server
containers.
docker-compose up -d
Routes are defined in ./src/Http/routes.php
file. The callback accepts the request method and the uri.
Only static routes are allowed, if you need some dynamic, please use query arguments.
The /status
route is predefined and returns a response with some system info.
There are two available functions for logging:
logger(string $message, array $context)
which rely on error_log function.report_error(\Throwable $e, array $context)
aslogger
but also sends an exception to Sentry whenSENTRY_DSN
constant is defined.
swagger-php is used for generating documentation in OpenAPI format:
composer make-api
composer test
composer check
- DI
- Advanced routing
- Database