PHPackages                             webimpress/http-middleware-compatibility - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. webimpress/http-middleware-compatibility

Abandoned → [psr/http-server-middleware](/?search=psr%2Fhttp-server-middleware)ArchivedLibrary[HTTP &amp; Networking](/categories/http)

webimpress/http-middleware-compatibility
========================================

Compatibility library for Draft PSR-15 HTTP Middleware

0.1.4(8y ago)13766.1k↓19.7%[1 issues](https://github.com/webimpress/http-middleware-compatibility/issues)[1 PRs](https://github.com/webimpress/http-middleware-compatibility/pulls)2BSD-2-ClausePHPPHP ^5.6 || ^7.0

Since Oct 5Pushed 8y ago3 watchersCompare

[ Source](https://github.com/webimpress/http-middleware-compatibility)[ Packagist](https://packagist.org/packages/webimpress/http-middleware-compatibility)[ Docs](https://github.com/webimpress/http-middleware-compatibility)[ RSS](/packages/webimpress-http-middleware-compatibility/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (7)Used By (2)

http-middleware-compatibility
=============================

[](#http-middleware-compatibility)

[![Build Status](https://camo.githubusercontent.com/acad5e6aa921a4249b9b26f617cab070fe217ce6fdf5cc4651717fdd95297698/68747470733a2f2f7472617669732d63692e6f72672f776562696d70726573732f687474702d6d6964646c65776172652d636f6d7061746962696c6974792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/webimpress/http-middleware-compatibility)

Purpose
-------

[](#purpose)

The purpose of the library is to deliver consistent interface for different versions of [`http-interop/http-middleware`](https://github.com/http-interop/http-middleware)which implements [Draft of PSR-15 HTTP Middleware](https://github.com/php-fig/fig-standards/tree/master/proposed/http-middleware).

Many projects currently use different version of library `http-interop/http-middleware` and updating to newest version requires usually major release. The library lets consumers of your component decide what version of `http-interop/http-middleware` they want to use and allow them to migrate to the latest version at any time.

Usage
-----

[](#usage)

Your middleware should implement interface `Webimpress\HttpMiddlewareCompatibility\MiddlewareInterface`, and for delegator/request handler you should use interface `Webimpress\HttpMiddlewareCompatibility\HandlerInterface`.

```
