Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

Releases: oscarotero/psr7-middlewares

3.21.1

28 Sep 21:26
Compare
Choose a tag to compare
  • Fixed bug in clientIp when the default headers are not initialized #83

3.21.0

27 Aug 10:15
Compare
Choose a tag to compare
  • 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

23 Mar 18:12
Compare
Choose a tag to compare
  • Added support for proxies in ClientIp. This changes the default behaviour of this middleware. More info #65
  • Added an argument to Https to invert the behaviour of the middleware #73

3.19.0

04 Jan 20:40
Compare
Choose a tag to compare
  • 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

05 Nov 09:33
Compare
Choose a tag to compare
  • 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

12 Oct 06:14
Compare
Choose a tag to compare
  • Https: New option Https::checkHttpsForward() to check the headers X-Forwarded-Proto: https or X-Forwarded-Port: 443
  • Https: Adds automatically the https protocol to the Location 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

02 Sep 14:31
Compare
Choose a tag to compare
  • Cache: Fixed support for micheh/psr-7cache ^0.5 #38

3.16.1

10 Jun 10:17
Compare
Choose a tag to compare

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

29 May 09:11
Compare
Choose a tag to compare

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

06 May 11:58
Compare
Choose a tag to compare
  • Payload support also the methods PATCH, COPY, LOCK and UNLOCK. (#33 thanks @jpkleemans)