All Versions
28
Latest Version
Avg Release Cycle
67 days
Latest Release
856 days ago

Changelog History
Page 2

  • v2.1.2 Changes

    October 12, 2017

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • โšก๏ธ #119 updates to webimpress/http-middleware-compatibility ^0.1.3. This was done to ensure backwards compatibilty by injecting the project composer.json with the currently installed version of http-interop/http-middleware, and in cases where that package is not yet installed, prompting the user to install it. This approach provides a tiered migration path to http-middleware 0.5.0 for users.
  • v2.1.1 Changes

    October 10, 2017

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #118 fixes how the MiddlewarePipe detects if the second parameter of callable middleware is a delegate/request handler when choosing whether or not to decorate it to ensure that it will properly decorate it when used with http-interop/http-middleware 0.5.0
  • v2.1.0 Changes

    October 09, 2017

    โž• Added

    • #112 adds support for http-interop/http-middleware 0.5.0 via a polyfill provided by the package webimpress/http-middleware-compatibility. Essentially, this means you can drop this package into an application targeting either the 0.4.1 or 0.5.0 versions of http-middleware, and it will "just work".

    • โž• Adds support for PHP 7.2.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • โœ‚ Removes support for HHVM.

    • ๐Ÿšš #107 removes the unused $raiseThrowables property from Zend\Stratigility\Next.

    ๐Ÿ›  Fixed

    • Nothing.
  • v2.0.1 Changes

    January 25, 2017

    โž• Added

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #98 fixes how Middleware::pipe() handles MiddlewarePipe instances passed to it; previously it was incorrectly wrapping them in CallableMiddlewareWrapper instances; it now pipes them as-is.
  • v2.0.0 Changes

    January 24, 2017

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • #96 changes the minimum supported http-interop/http-middleware version to 0.4.1. This impacts several things:

      • Middleware that implemented the http-interop/http-middleware 0.2.0 interfaces will no longer work with Stratigility. In most cases, these can be updated by changing import statements. As an example:
      // http-middleware 0.2.0:
      use Interop\Http\Middleware\DelegateInterface;
      use Interop\Http\Middleware\ServerMiddlewareInterface;
      
      // Becomes the following under 0.4.1:
      use Interop\Http\ServerMiddleware\DelegateInterface;
      use Interop\Http\ServerMiddleware\MiddlewareInterface as ServerMiddlewareInterface;
      
      • The various classes under Zend\Stratigility\Middleware now implement the new interfaces, which could affect extending classes.
      • Zend\Stratigility\Next and Zend\Stratigility\Delegate\CallableDelegateDecorator have signature changes due to changes in the DelegateInterface; again, these changes should only affect those extending the classes.
      • Interop\Http\Middleware\MiddlewareInterface (which was intended for implementation by client-side middleware) no longer exists, which means it is also no longer supported within Stratigility.
    • โšก๏ธ #67 updates each of Zend\Stratigility\MiddlewarePipe, Zend\Stratigility\Middleware\ErrorHandler, and Zend\Stratigility\Middleware\NotFoundHandler to require all arguments (none are optional).

    • #67 modifies the internals of Zend\Stratigility\MiddlewarePipe's __invoke() method.

      • When instantiating the Next instance, it now captures it in a variable named $layer.
      • If the result of Next is not a response instance, the response passed during invocation is promoted as the layer response.
      • The response is then passed to the $next argument provided at invocation, and the result of that returned without verification.

    In most cases, this should have no impact on your application.

    • #71 modifies Zend\Stratigility\MiddlewarePipe such that it no longer decorates the request and response provided at invocation with the Zend\Stratigility\Http\* variants, as these have been removed.

    • โšก๏ธ #76 updates MiddlewarePipe to implement only the http-interop/http-middleware server-side middleware interface, and not the Stratigility-specific MiddlewareInterface (which was removed).

    • โšก๏ธ #76 updates Zend\Stratigility\Middleware\ErrorHandler to implement the http-interop/http-middleware server-side middleware interface instead of the Stratigility-specific MiddlewareInterface (which was removed).

    • โšก๏ธ #76 updates Zend\Stratigility\Middleware\NotFoundHandler to implement the http-interop/http-middleware server-side middleware interface instead of the Stratigility-specific MiddlewareInterface (which was removed).

    • โšก๏ธ #76 updates MiddlewarePipe::__invoke() to require a third argument, now named $delegate, and no longer type-hinted. If a callable not implementing http-interop/http-middleware DelegateInterface is provided, it is wrapped in the CallableDelegateDecorator (introduced in 1.3.0). The method then calls its own process() method with the request and delegate. This method should typically only be used as an entry point for an application.

    • โšก๏ธ #76 updates MiddlewarePipe::pipe() to raise an exception if callable middleware using the legacy double-pass signature is provided, but no response prototype is composed in the MiddlewarePipe instance yet.

    • โšก๏ธ #76 updates the constructor of Next to rename the $done argument to $nextDelegate and typehint it against the http-interop/http-middleware DelegateInterface.

    • โšก๏ธ #76 updates Next::__invoke() to remove all arguments except the $request argument; the method now proxies to the instance process() method.

    • โšก๏ธ #76 updates Next to no longer compose a Dispatch instance; it is now capable of dispatching on its own.

    • โšก๏ธ #76 updates the Zend\Stratigility\Route constructor to raise an exception if non-http-interop middleware is provided as the route handler.

    • โšก๏ธ #79 updates the raiseThrowables() method of each of MiddlewarePipe and Next to be no-ops.

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ #79 deprecates the raiseThrowables() method of each of MiddlewarePipe and Next.

    โœ‚ Removed

    • ๐Ÿšš Zend\Stratigility\Exception\MiddlewareException was removed as it is no longer thrown.

    • ๐Ÿšš #67 removes Zend\Stratigility\FinalHandler. Use Zend\Stratigility\NoopFinalHandler instead, along with Zend\Stratigility\Middleware\ErrorHandler and Zend\Stratigility\Middleware\NotFoundHandler (or equivalents).

    • ๐Ÿšš #67 removes Zend\Stratigility\ErrorMiddlewareInterface. Register middleware, such as Zend\Stratigility\Middleware\ErrorHandler, in outer layers of your application to handle errors.

    • ๐Ÿšš #67 removes Zend\Stratigility\Dispatch. This was an internal detail of the Next implementation, and should not affect most applications.

    • ๐Ÿšš #67 removes Zend\Stratigility\Utils::getArity(). This was used only in Dispatch; since middleware signatures no longer vary, it is no longer necessary.

    • ๐Ÿšš #67 removes the final, optional $err argument to Zend\Stratigility\Next(); raise exceptions instead, and provide error handling middleware such as Zend\Stratigility\Middleware\ErrorHandler instead.

    • ๐Ÿšš #67 removes the $done argument to the Zend\Stratigility\Next constructor.

    • ๐Ÿšš #71 removes the Zend\Stratigility\Http\Request class.

    • ๐Ÿšš #71 removes the Zend\Stratigility\Http\Response class.

    • ๐Ÿšš #71 removes Zend\Stratigility\Http\ResponseInterface.

    • ๐Ÿšš #76 removes Zend\Stratigility\MiddlewareInterface and Zend\Stratigility\ErrorMiddlewareInterface. The latter is removed entirely, while the former is essentially replaced by http-interop's ServerMiddlewareInterface. You may still write callable middleware using the legacy double-pass signature, however.

    • ๐Ÿšš #76 removes the Zend\Stratigility\Dispatch class. The class was an internal detail of Next, and no longer required.

    ๐Ÿ›  Fixed

    • Nothing.
  • v1.3.3 Changes

    January 23, 2017

    โž• Added

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #86 fixes the links to documentation in several exception messages to ensure they will be useful to developers.
  • v1.3.2 Changes

    January 05, 2017

    โž• Added

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #95 fixes an issue with how the $err is dealt with. Specifically, if an error arises, then subsequent middlewares should be dispatched as callables. Without this fix, stratigility would simply continue dispatching middlewares, ignoring the failing ones.
  • v1.3.1 Changes

    November 10, 2016

    โž• Added

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #85 fixes an issue with how the $done or $nextDelegate is invoked by Next when an error is present. Previously, the class was detecting a Next instance as an http-interop DelegateInterface instance and dropping the error; this would then mean if the instance contained error middleware, it would never be dispatched.
  • v1.3.0 Changes

    November 10, 2016

    โž• Added

    • #66 adds a new class, Zend\Stratigility\Middleware\NotFoundHandler. This class may be piped into an application at an innermost layer; when invoked, it will return a 404 plain text response.

    • #66 adds a new class, Zend\Stratigility\Middleware\ErrorHandler. This class may be piped into an application, typically at the outermost or one of the outermost layers. When invoked, it does the following:

      • Creates a PHP error handler that will re-throw PHP errors as ErrorExceptions.
      • Dispatches to the next layer.
      • If the next layer does not return a response, it raises a new MissingResponseException.
      • Catches all exceptions from calling the next layer, and passes them to an error response generator to return an error response.

    A default error response generator is provided, which will return a 5XX series response in plain text. You may provide a callable generator to the constructor in order to customize the response generated; please refer to the documentation for details.

    • #66 adds a new class, Zend\Stratigility\NoopFinalHandler. This class may be provided as the $out argument to a MiddlewarePipe, or as the final handler to Zend\Diactoros\Server::listen() (in which case it will be passed to the middleware you invoke as the application). This handler returns the response provided to it verbatim.

    • #70 adds a new class, Zend\Stratigility\Middleware\OriginalMessages. Compose this middleware in an outermost layer, and it will inject the following attributes in the request passed to nested layers:

      • originalRequest, representing the request provided to it.
      • originalResponse, representing the response provided to it.
      • originalUri, representing URI instance composed in the request provided to it.
    • ๐Ÿ‘ #75 adds support for http-interop middleware 0.2.0. For full details, see the migration guide. As a summary of features:

      • You may now pipe http-interop middleware to MiddlewarePipe instances.
      • You may now pipe callable middleware that defines the same signature as http-interop middleware to MiddlewarePipe instances; these will be decorated in a Zend\Stratigility\Middleware\CallableInteropMiddlewareWrapper instance.
      • MiddlewarePipe now implements the http-interop ServerMiddlewareInterface, allowing it to be used in http-interop middleware dispatchers.
    • #75 adds the class Zend\Stratigility\Middleware\CallableMiddlewareWrapper. It accepts callable double-pass middleware and a response prototype, and implements the http-interop ServerMiddlewareInterface, allowing you to adapt existing callable middleware to work with http-interop middleware dispatchers.

    • #75 adds the class Zend\Stratigility\Middleware\CallableInteropMiddlewareWrapper. It accepts callable middleware that follows the http-interop ServerMiddlewareInterface, and implements that interface itself, to allow composing such middleware in http-interop middleware dispatchers.

    • #75 adds the class Zend\Stratigility\Delegate\CallableDelegateDecorator, which can be used to add http-interop middleware support to your existing callable middleware.

    • #75 adds a new method to MiddlewarePipe, setResponseProtoype(). When this method is invoked with a PSR-7 response, the following occurs:

      • That response is injected in Next and Dispatch instances, to allow dispatching legacy callable middleware as if it were http-interop middleware.
      • Any callable middleware implementing the legacy signature will now be decorated using the above CallableMiddlewareWrapper in order to adapt it as http-interop middleware.
    • #78 adds a new method to each of Zend\Stratigility\MiddlewarePipe, Next, and Dispatch: raiseThrowables(). When called, Dispatch will no longer wrap dispatch of middleware in a try/catch block, allowing throwables/exceptions to bubble out. This enables the ability to create error handling middleware as an outer layer or your application instead of relying on error middleware and/or the final handler. Typical usage will be to call the method on the MiddlewarePipe before dispatching it.

    ๐Ÿ”„ Changed

    • #70 makes the following changes to Zend\Stratigility\FinalHandler:

      • It now pulls the original request using the originalRequest attribute, instead of getOriginalRequest(); see the deprecation of Zend\Stratigility\Http\Request, below, for why this works.
      • It no longer writes to the response using the Zend\Stratigility\Http\Response-specific write() method, but rather pulls the message body and writes to that.
    • โšก๏ธ #75 updates MiddlewarePipe to inject the $response argument to __invoke() as the response prototype.

    • โšก๏ธ #75 updates Zend\Stratigility\Next to implement the http-interop middleware DelegateInterface. It also updates Zend\Stratigility\Dispatch to add a new method, process(), following the DelegateInterface signature, thus allowing Next to properly process http-interop middleware. These methods will use the composed response prototype, if present, to invoke callable middleware using the legacy signature.

    • โšก๏ธ #75 updates Next to allow the $done constructor argument to be an http-interop DelegateInterface, and will invoke it as such if the queue is exhausted.

    • โšก๏ธ #75 updates Route (which is used internally by MiddlewarePipe to allow either callable or http-interop middleware as route handlers.

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ #66 deprecates the Zend\Stratigility\FinalHandler class. We now recommend using the NoopFinalHandler, along with the ErrorHandler and NotFoundHandler middleware (or equivalents) to provide a more fine-grained, flexible, error handling solution for your applications.

    • ๐Ÿ—„ #66 deprecates the Zend\Stratigility\Dispatch class. This class is used internally by Next, and deprecation should not affect the majority of users.

    • ๐Ÿ—„ #66 deprecates Zend\Stratigility\ErrorMiddlewareInterface. We recommend instead using exceptions, along with the ErrorHandler, to provide error handling for your application.

    • โšก๏ธ #66 updates Zend\Stratigility\MiddlewarePipe::__invoke() to emit a deprecation notice if no $out argument is provided, as version 2 will require it.

    • โšก๏ธ #66 updates Zend\Stratigility\Next::__invoke() to emit a deprecation notice if a non-null $err argument is provided; middleware should raise an exception, instead of invoking middleware implementing ErrorMiddlewareInterface.

    • ๐Ÿ—„ #70 deprecates Zend\Stratigility\Http\Request. Additionally:

      • The composed "PSR Request" is now injected with an additional attribute, originalRequest, allowing retrieval using standard PSR-7 attribute access.
      • The methods getCurrentRequest() and getOriginalRequest() now emit deprecation notices when invoked, urging users to update their code.
    • ๐Ÿ—„ #70 deprecates Zend\Stratigility\Http\ResponseInterface.

    • ๐Ÿ—„ #70 deprecates Zend\Stratigility\Http\Response. Additionally, the methods write(), end(), isComplete(), and getOriginalResponse() now emit deprecation notices when invoked, urging users to update their code.

    • ๐Ÿ—„ #75 deprecates the $response argument in existing callable middleware. Please only operate on the response returned by $next/$delegate, or create a response. See the documentation section on response arguments for more details.

    • ๐Ÿ—„ #75 deprecates usage of error middleware, and thus deprecates the $err argument to $next; explicitly invoking error middleware using that argument to $next will now raise a deprecation notice.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • Nothing.
  • v1.2.1 Changes

    March 24, 2016

    โž• Added

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #52 fixes the behavior of the FinalHandler with regards to exception handling, ensuring that the reason phrase reported corresponds to the HTTP status code used.
    • #54 modifies the behavior of the FinalHandler when creating an error or 404 response to call write() instead of end() on the response object. This fixes a lingering issue with emitting the Content-Length header from the SapiEmitter, as well as prevents the SapiEmitter from raising exceptions when doing so (which was happening starting with 1.2.0).