Can I use this middleware directly with as an psr-7 middleare?
reinaldorauch opened this issue · 2 comments
reinaldorauch commented
Can I use this middleware directly with as an psr-7 middleare?
oscarotero commented
What do you mean with "psr-7 middleware"?
For some people, Psr7-middlewares refer to the first and not standardized version of middlewares using PSR-7 (for example: https://github.com/oscarotero/psr7-middlewares) with the following signature:
function ($request, $response, $next)
This middleware use the PSR-15 standard, which is compatible with PSR-7 but using a different signature:
function ($request, $next)
So yes, it's compatible with PSR-7 libraries, but through the PSR-15 signature.
reinaldorauch commented
Oh, I see. I was trying do use it with slim 3 which does not follow psr-15 so it didn't work. I used that late package (psr7-middlewares) to fill my use case. Many thanks for your time o/ and congrats on the work here, very neat o7