This repository has been archived by the owner on Jun 30, 2020. It is now read-only.
Releases: oscarotero/psr7-middlewares
Releases · oscarotero/psr7-middlewares
3.21.1
3.21.0
- Added an option to prepend namespaces to override middlewares #78
- Fixed phpunit tests #82
- Improved FormatNegotiator #80 #81:
- Fixed the behaviour of the default format in some circunstances
- Allow to disable the default format returning a 406 response if no format has been found
- Allow to customize the list of available formats
3.20.0
3.19.0
- Robots: Use
Content-Type: text/plain
for robots.txt #47 - Fixed a conflict with the version of fast-route and league/route #53
- New JsonValidator middleware, to validate the json scheme of the request's body. It's like the JsonSchema middleware but without the router functionality. #46 #58
BasicAuthentication::checkUserPassword()
is protected, allowing to override it. #60- New option
Cors::logger()
to provide a psr-3 logger instance to debugging #61 - Fixed Csrf in php 5 #62
- New option
Payload::override()
to override the previous parsed body if exists.
3.18.0
- New middleware JsonSchema by @abacaphiliac #44 to validate
application/json
request - Payload Added an argument to provide an array of parsing options (thanks @abacaphiliac )
- Added the missing documentation for IncludeResponse
3.17.0
- Https: New option
Https::checkHttpsForward()
to check the headersX-Forwarded-Proto: https
orX-Forwarded-Port: 443
- Https: Adds automatically the
https
protocol to theLocation
header in redirect responses to avoid infinite redirections #41 - The stream factory receives a third argument with the stream object to replace #42
3.16.2
3.16.1
ErrorHandler: added a statusCode
option to filter the status code handled by the middleware. Example:
Middleware::errorHandler('myHandler')
->statusCode(function ($code) {
return $code === 500;
});
3.16.0
New middlewares
- IncludeResponse
Fixes
- SaveResponse: do not save responses with the header
location
- FormatNegotiator: removed duplicated code that inserts the
Content-Type
header twice - DebugBar: removed unnecesary FormatNegotiator dependency
- Fixed some bugs reported by @ircmaxell in this post
- ErrorHandler: created an empty body before execute the callback #35
3.15.1
- Payload support also the methods PATCH, COPY, LOCK and UNLOCK. (#33 thanks @jpkleemans)