PSR-7 got released May 4, 2015. There is a discussion about middlewares based on PSR-7 messages, and it is awfully overdue. The most common middlewares in use since June 2015 are callables with this interface:

They just work. I’ve been using them since June 2015. You can stack a number of middlewares with tools like relay/relay or mindplay/middleman. I prefer the latter because it plays well with container-interop containers to resolve middlewares when you need them.

Granted, you can use them wrong by fiddling with the Response before passing it on to the next middleware. Just don’t do that. But I’d rather educate newbies than to remodel the whole thing and to make it overly complex. I’ve been giving this PSR-7 talk for 12! months now. Please just spread the word and stop discussing something that has been in use for over a year now.


PSR-7 middlewares discussion links:

Some links might be missing here. Feel free to send a PR.

Blog Logo

Hannes Van De Vreken



Hannes Van De Vreken

Working as a web developer. On his blog he writes about things he learned while experimenting with tools he might use to speed up his development.

Back to Overview