All Versions
37
Latest Version
Avg Release Cycle
160 days
Latest Release
616 days ago

Changelog History
Page 2

  • v3.0.2.p2

    March 23, 2020
  • v3.0.1 Changes

    April 04, 2018

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  zendframework/zend-stratigility#165 fixes an issue with the PathMiddlewareDecorator whereby it was using the original request when invoking the handler it creates, instead of prepending the configured path prefix to the request URI created. With the fix, if middleware alters the request path passed to the handler, the changes will now propagate to later middleware. As an example:
      new PathMiddlewareDecorator('/api', middleware(function ($request, $handler) {
          $uri = $request->getUri();
          if (! preg_match('#^/v\d+/#', $uri->getPath())) {
              $request = $request->withUri($uri->withPath('/v1' . $uri->getPath()));
          }
          return $handler->handle($request);
      }));
    

    For the request path /api/books, the above will now correctly result in /api/v1/books being propagated to lower layers of the application, instead of /api/books.

  • v3.0.1.p2

    March 23, 2020
  • v3.0.0 Changes

    March 15, 2018

    โž• Added

    • zendframework/zend-stratigility#146 adds a new interface, Laminas\Stratigility\MiddlewarePipeInterface. It extends the PSR-15 MiddlewareInterface and RequestHandlerInterface, and defines one additional method, pipe(MiddlewareInterface $middleware) : void.

    • zendframework/zend-stratigility#150 adds a new class, Laminas\Stratigility\Middleware\RequestHandlerMiddleware. The class implements the PSR-15 RequestHandlerInterface and MiddlewareInterface, and accepts a single constructor argument, a RequestHandlerInterface instance. Each of its handle() and process() methods proxy to the composed request handler's handle() method, returning its result.

    This class can be useful for adapting request handlers to use within pipelines.

    • zendframework/zend-stratigility#142 adds a new class, Laminas\Stratigility\Middleware\HostMiddlewareDecorator, which provides host segregation functionality for middleware, allowing conditional execution of middleware only if the requested host matches a configured host.
      // Only process $middleware if the request host matches 'example.com':
      $pipeline->pipe(new HostMiddlewareDecorator('example.com', $middleware));
    

    Additionally, the patch provides a utility function, Laminas\Stratigility\host(), to simplify the above declaration:

      $pipeline->pipe(host('example.com', $middleware));
    
    • zendframework/zend-stratigility#128 adds a marker interface, Laminas\Stratigility\Exception\ExceptionInterface; all package exceptions now implement this interface, allowing you to catch all package-related exceptions by typehinting against it.

    ๐Ÿ”„ Changed

    • โšก๏ธ zendframework/zend-stratigility#145 updates the component to implement and consume ONLY PSR-15 interfaces; http-interop interfaces and callable middleware are no longer directly supported (though Stratigility provides decorators for the latter in order to cast them to PSR-15 implementations).

    • zendframework/zend-stratigility#134 and zendframework/zend-stratigility#146 modify MiddlewarePipe in two ways: it now implements the new MiddlewarePipeInterface, and is marked as final, disallowing direct extension. Either decorate an instance in a custom MiddlewarePipeInterface implementation, or create a custom PSR-15 MiddlewareInterface implementation if piping is not necessary or will allow additional types.

    • zendframework/zend-stratigility#155 modifies each of the following classes to mark them final:

      • Laminas\Stratigility\Middleware\CallableMiddlewareDecorator
      • Laminas\Stratigility\Middleware\DoublePassMiddlewareDecorator
      • Laminas\Stratigility\Middleware\HostMiddlewareDecorator
      • Laminas\Stratigility\Middleware\NotFoundHandler
      • Laminas\Stratigility\Middleware\OriginalMessages
      • Laminas\Stratigility\Middleware\PathMiddlewareDecorator
      • Laminas\Stratigility\Middleware\RequestHandlerMiddleware
      • Laminas\Stratigility\Next
    • zendframework/zend-stratigility#134, zendframework/zend-stratigility#145, and zendframework/zend-stratigility#146 update MiddlewarePipe to implement Psr\Http\Server\RequestHandlerInterface. Calling it will cause it to pull the first middleware off the queue and create a Next implementation that uses the remaining queue as the request handler; it then processes the middleware.

    • ๐Ÿšš zendframework/zend-stratigility#134 removes the ability to specify a path when calling pipe(); use the PathMiddlewareDecorator or path() utility function to pipe middleware with path segregation.

    • zendframework/zend-stratigility#153 modifies the first argument of the Mezzio\Middleware\ErrorHandler and NotFoundHandler classes. Previously, they each expected a Psr\Http\Message\ResponseInterface instance; they now both expect a PHP callable capable of producing such an instance. This change was done to simplify re-use of a service for producing unique response instances within dependency injection containers.

    • zendframework/zend-stratigility#157 marks the package as conflicting with zendframework/zend-diactoros versions less than 1.7.1. This is due to the fact that that version provides a bugfix for its Uri::getHost() implementation that ensures it follows the PSR-7 and IETF RFC 3986 specifications.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • ๐Ÿšš zendframework/zend-stratigility#163 removes Laminas\Stratigility\Middleware\PathRequestHandlerDecorator, as it was deprecated in 2.2, and no longer used with the 3.0 code base.

    • ๐Ÿšš zendframework/zend-stratigility#122 removes support for PHP versions 5.6, 7.0, as well as HHVM.

    • ๐Ÿšš zendframework/zend-stratigility#122 removes the following classes:

      • Laminas\Stratigility\Delegate\CallableDelegateDecorator
      • Laminas\Stratigility\Exception\InvalidRequestTypeException
      • Laminas\Stratigility\Exception\MissingResponsePrototypeException
      • Laminas\Stratigility\MiddlewareInterface
      • Laminas\Stratigility\Middleware\CallableInteropMiddlewareWrapper
      • Laminas\Stratigility\Middleware\CallableMiddlewareWrapper
      • Laminas\Stratigility\Middleware\CallableMiddlewareWrapperFactory
      • Laminas\Stratigility\NoopFinalHandler
    • ๐Ÿšš zendframework/zend-stratigility#134 removes the class Laminas\Stratigility\Route. This was an internal message passed between a MiddlewarePipe and Next instance, and its removal should not affect end users.

    • ๐Ÿšš zendframework/zend-stratigility#134 removes Laminas\Stratigility\Exception\InvalidMiddlewareException, as the exception is no longer raised by MiddlewarePipe.

    ๐Ÿ›  Fixed

    • Nothing.
  • v3.0.0.p2

    March 23, 2020
  • v2.2.2.p2

    March 23, 2020
  • v2.2.1.p2

    March 23, 2020
  • v2.2.0 Changes

    March 12, 2018

    โž• Added

    • zendframework/zend-stratigility#140 adds the class Laminas\Stratigility\Middleware\CallableMiddlewareDecorator for the purpose of decorating callable, standards-signature middleware for use with a MiddlewarePipe instance. Instantiate it directly, passing the callable middleware as the sole argument, or use the Laminas\Stratigility\middleware() utility function to generate the instance: middleware($callable).

    • zendframework/zend-stratigility#140 adds the class Laminas\Stratigility\Middleware\DoublePassMiddlewareDecorator for the purpose of decorating callable, double-pass middleware for use with a MiddlewarePipe instance. Instantiate it directly, passing the callable middleware and a response instance as arguments, or use the Laminas\Stratigility\doublePassMiddleware() utility function to generate the instance: doublePassMiddleware($callable, $response).

    • zendframework/zend-stratigility#140 adds the class Laminas\Stratigility\Middleware\PathMiddlewareDecorator for the purposes of creating path-segregated middleware. The constructor expects a string path literal as the first argument, and an Interop\Http\Server\MiddlewareInterface instance for the second argument. Alternately, use the Laminas\Stratigility\path() utility function to generate the instance: path('/foo', $middleware).

    This decorator class replaces usage of the $path argument to MiddlewarePipe::pipe(), and should be used to ensure your application is forwards-compatible with the upcoming version 3 release.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the class Laminas\Stratigility\Route. This class is an internal detail, and will be removed in version 3.0.0.

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the class Laminas\Stratigility\Exception\InvalidMiddlewareException. This class will be removed in version 3.0.0 as it will no longer be necessary due to typehint usage.

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the class Laminas\Stratigility\Exception\InvalidRequestTypeException as it is no longer used by the package. It will be removed in version 3.0.0.

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the class Laminas\Stratigility\Middleware\CallableInteropMiddlewareWrapper as it is based on interfaces that will no longer be used starting in version 3.0.0. It will be removed in version 3.0.0. Please use the new class Laminas\Stratigility\Middleware\CallableMiddlewareDecorator, or the utility function middleware(), to decorate callable standards-signature middleware.

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the class Laminas\Stratigility\Middleware\CallableMiddlewareWrapper as it is based on interfaces that will no longer be used starting in version 3.0.0. It will be removed in version 3.0.0. Please use the new class Laminas\Stratigility\Middleware\DoublePassMiddlewareDecorator, or the utility function doublePassMiddleware(), to decorate callable double pass middleware.

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the class Laminas\Stratigility\Middleware\CallableMiddlewareWrapperFactory as the class it is associated will be removed starting in version 3.0.0. The class will be removed in version 3.0.0.

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the class Laminas\Stratigility\NoopFinalHandler as the class will be removed starting in version 3.0.0.

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the two-argument form of Laminas\Stratigility\MiddlewarePipe::pipe(). If you need to perform path segregation, use the Laminas\Stratigility\Middleware\PathMiddlewareDecorator class and/or the Laminas\Stratigility\path() function to decorate your middleware in order to provide path segregation.

    • ๐Ÿ—„ zendframework/zend-stratigility#140 deprecates the piping of double pass middleware directly to pipe(); decorate your double-pass middleware using Laminas\Stratigility\Middleware\DoublePassMiddleware or Laminas\Stratigility\doublePassMiddleware() prior to piping.

    • ๐Ÿ—„ zendframework/zend-stratigility#159 deprecates Laminas\Stratigility\MiddlewarePipe::setCallableMiddlewareDecorator(). Use Laminas\Stratigility\doublePassMiddleware() or Laminas\Stratigility\Middleware\DoublePassMiddleware prior to passing your double-pass middleware to MiddlewarePipe::pipe().

    • ๐Ÿ—„ zendframework/zend-stratigility#159 deprecates Laminas\Stratigility\MiddlewarePipe::setResponsePrototype(). This was used only to seed an instance of Laminas\Stratigility\Middleware\CallableMiddlewareWrapperFactory previously; pass your response prototype directly to a new instance of Laminas\Stratigility\Middleware\DoublePassMiddleware or the `Laminas\Stratigility\doublePassMiddleware() function instead.

    • ๐Ÿ—„ zendframework/zend-stratigility#159 deprecates Laminas\Stratigility\MiddlewarePipe::hasResponsePrototype().

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • Nothing.
  • v2.2.0.p2

    March 23, 2020
  • v2.1.2 Changes

    October 12, 2017

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • โšก๏ธ zendframework/zend-stratigility#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.