middlewares / skeleton
A skeleton repository for PSR-15 middleware packages
v0.9.1
2021-04-02 11:25 UTC
Requires
- php: ^7.2 || ^8.0
- psr/http-server-middleware: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- laminas/laminas-diactoros: ^2.3
- middlewares/utils: ^3.0
- oscarotero/php-cs-fixer-config: ^1.0
- phpunit/phpunit: ^8|^9
- squizlabs/php_codesniffer: ^3.0
README
This is a skeleton to create packages implementing PSR-15 using composer:
composer create-project middlewares/skeleton my-middleware
middlewares/skeleton
Description of the middleware
Requirements
- PHP >= 7.2
- A PSR-7 http library
- A PSR-15 middleware dispatcher
Installation
This package is installable and autoloadable via Composer as middlewares/skeleton.
composer require middlewares/skeleton
Example
$dispatcher = new Dispatcher([ (new Middlewares\Skeleton()) ->option1() ->option2($value) ]); $response = $dispatcher->dispatch(new ServerRequest());
Usage
option1
Option description
option2
Option description
Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.