PHPackages                             cornfield-io/middlewares - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. cornfield-io/middlewares

ActiveLibrary

cornfield-io/middlewares
========================

PSR-15: HTTP Server Request Handlers implementation.

2.1.0(7y ago)2722MITPHPPHP &gt;=7.2

Since Mar 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/cornfield-io/middlewares)[ Packagist](https://packagist.org/packages/cornfield-io/middlewares)[ RSS](/packages/cornfield-io-middlewares/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (9)Versions (8)Used By (0)

cornfield-io/middlewares
========================

[](#cornfield-iomiddlewares)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7907baf662f6d0f76e518f094c2c42ea79f1e767c9dae96637812a201f9af68f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f726e6669656c642d696f2f6d6964646c6577617265732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cornfield-io/middlewares)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/32adc0d3f546096e71dc5c4b32fdd33f6014a432569a236691886cd8414e29cd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f726e6669656c642d696f2f6d6964646c6577617265732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/cornfield-io/middlewares)[![Coverage Status](https://camo.githubusercontent.com/76161fd3e8ed456ca3510db690e7f9af83fa2c3d3fa04f0a2d692fe18764c2eb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f636f726e6669656c642d696f2f6d6964646c6577617265732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cornfield-io/middlewares/code-structure)[![Quality Score](https://camo.githubusercontent.com/1781080dd1f763da9d2b0a28d20d541731b3827eaf31d25cb3c28569d6d0b1dc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636f726e6669656c642d696f2f6d6964646c6577617265732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cornfield-io/middlewares)

[PSR-15](https://www.php-fig.org/psr/psr-15/): HTTP Server Request Handlers implementation.

Install
-------

[](#install)

Via Composer

```
$ composer require cornfield-io/middlewares
```

### Requirements

[](#requirements)

- You need `PHP >= 7.2.0` to use `Cornfield\Middlewares` but the latest stable version of PHP is recommended.
- An implementation of PSR-7 (we recommend the [Zend Diactoros project](https://github.com/zendframework/zend-diactoros/)).
- Optionally, you could also install a [PSR-11](https://www.php-fig.org/psr/psr-11/) dependency injection container (we recommend the [PHP-DI project](http://php-di.org/)).

Throughout this documentation, we will assume that you are using the packages above. If you want, you can still install other implementations of [PSR-7](https://packagist.org/providers/psr/http-message-implementation) or [PSR-11](https://packagist.org/providers/psr/container-implementation).

Usage
-----

[](#usage)

All middlewares added must implement `Psr\Http\Server\MiddlewareInterface`.

```
