mbunge / php-application
This package provides an easy way to create a PHP Application.
Requires
- php: ^8.0.0
- ext-json: *
Requires (Dev)
- league/event: ^3.0
- phpunir/phpunit: >=9.1.4
This package is auto-updated.
Last update: 2024-11-29 06:29:45 UTC
README
This package provides an easy way to create a PHP Application.
Features
- PSR-14 Events
- PSR-11 Container
- PSR-7 compatibility
See Upcoming features of next release.
Concept
The Application acts as some kind of front controller and initiates and execute a controller for a specific context like HTTP, CLI, etc
The application is not aware of concrete implementation details of controller
Context controller
Application controller executes application logic for a specific context and is not related to MVC-Controller
Logic depend on the field of use
- Front-Controller
- middleware handler
- use-case or interceptor handler
- framework (http, cli, db) controller
- etc.
Controller decorator
Controller decorators add more additional behaviors without changing context controller and is able to deal with frameworks like DI-Containers, routers, event dispatches, API-Clients etc.
Install
Via Composer
$ composer require mbunge/php-application
Usage
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Deployment
Only maintainers are allowed to deploy new versions!
- Run
composer run release
which will run tests and on success update changelog, package version and creates a release tag - switch to master branch and merge develop branch
- Run
composer run deploy
which will run tests and on success push tags, master branch and develop branch
Security
If you discover any security related issues, please email marco_bunge@web.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.