thingston / http-router
An HTTP router supporting PSR-15 request handlers.
v1.3.1
2022-07-15 13:24 UTC
Requires
- php: >=8.1
- guzzlehttp/psr7: ^2.3
- nikic/fast-route: ^1.3
- psr/container: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- thingston/http-exception: ^1.0
Requires (Dev)
- phpstan/phpstan: ^1.5
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
- symfony/var-dumper: ^6.0
- thingston/coverage-check: ^1.0
README
An HTTP router supporting PSR-15 request handlers.
Requirements
- PHP 8.1
Instalation
composer require thingston/http-router
Usage
Please check the Documentation.
Testing
Available Composer scripts:
composer run test
- Runs all tests using PHPUnit.composer run coverage:text
- Runs all tests using PHPUnit and generates a coverage report to the console.composer run coverage:clover
- Runs all tests using PHPUnit and generates an XML coverage report to filecoverage.xml
.composer run coverage:html
- Runs all tests using PHPUnit and generates an XML coverage report to directorycoverage
.composer run coverage:check
- Runs thecoverage:clover
script and checks the code coverage rate (requires >= 90%).composer run analyze
- Runs the PHPStan static analysis and displays the results to the console.composer run cs
- Runs the Code Sniffer static analysis and displays any errors to the console.composer run cbf
- Runs the Code Sniffer code fixer and displays the results to the console.composer run checks
- Runs the scriptscs
,analyze
andcoverage:check
and displays the results to the console.
Support
- Issues: https://github.com/thingston/http-router/issues
- Documentation: https://github.com/thingston/http-router/wiki