All Versions
48
Latest Version
Avg Release Cycle
33 days
Latest Release
1943 days ago

Changelog History
Page 2

  • v2.2.0 Changes

    March 12, 2018

    โž• Added

    • #581 adds the class Zend\Expressive\ConfigProvider, and exposes it to the zend-component-installer Composer plugin. We recommend updating your config/config.php to reference it, as well as the Zend\Expressive\Router\ConfigProvider shipped with zend-expressive-router versions 2.4 and up.

    • #581 adds the class Zend\Expressive\Container\ApplicationConfigInjectionDelegator. The class can act as a delegator factory, and, when enabled, will inject routes and pipeline middleware defined in configuration.

    Additionally, the class exposes two static methods:

    • injectPipelineFromConfig(Application $app, array $config)
    • injectRoutesFromConfig(Application $app, array $config)

    These may be called to modify an Application instance based on an array of configuration. See thd documentation for more details.

    • #581 adds the class Zend\Expressive\Handler\NotFoundHandler; the class takes over the functionality previously provided in Zend\Expressive\Delegate\NotFoundDelegate.

    ๐Ÿ”„ Changed

    • โšก๏ธ #581 updates the minimum supported zend-stratigility version to 2.2.0.

    • โšก๏ธ #581 updates the minimum supported zend-expressive-router version to 2.4.0.

    ๐Ÿ—„ Deprecated

    • ๐Ÿ—„ #581 deprecates the following classes and traits:

      • Zend\Expressive\AppFactory: if you are using this, you will need to switch to direct usage of Zend\Expressive\Application or a Zend\Stratigility\MiddlewarePipe instance.
      • Zend\Expressive\ApplicationConfigInjectionTrait: if you are using it, it is marked internal, and deprecated; it will be removed in version 3.
      • Zend\Expressive\Container\NotFoundDelegateFactory: the NotFoundDelegate will be renamed to Zend\Expressive\Handler\NotFoundHandler in version 3, making this factory obsolete.
      • Zend\Expressive\Delegate\NotFoundDelegate: this class becomes Zend\Expressive\Handler\NotFoundHandler in v3, and the new class is added in version 2.2 as well.
      • Zend\Expressive\Emitter\EmitterStack: the emitter concept is extracted from zend-diactoros to a new component, zend-httphandlerrunner. This latter component is used in version 3, and defines the EmitterStack class. Unless you are extending it or interacting with it directly, this change should not affect you; the Zend\Diactoros\Response\EmitterInterface service will be directed to the new class in that version.
      • Zend\Expressive\IsCallableInteropMiddlewareTrait: if you are using it, it is marked internal, and deprecated; it will be removed in version 3.
      • Zend\Expressive\MarshalMiddlewareTrait: if you are using it, it is marked internal, and deprecated; it will be removed in version 3.
      • Zend\Expressive\Middleware\DispatchMiddleware: this functionality has been moved to zend-expressive-router, under the Zend\Expressive\Router\Middleware namespace.
      • Zend\Expressive\Middleware\ImplicitHeadMiddleware: this functionality has been moved to zend-expressive-router, under the Zend\Expressive\Router\Middleware namespace.
      • Zend\Expressive\Middleware\ImplicitOptionsMiddleware: this functionality has been moved to zend-expressive-router, under the Zend\Expressive\Router\Middleware namespace.
      • Zend\Expressive\Middleware\NotFoundHandler: this will be removed in version 3, where you can instead pipe Zend\Expressive\Handler\NotFoundHandler directly instead.
      • Zend\Expressive\Middleware\RouteMiddleware: this functionality has been moved to zend-expressive-router, under the Zend\Expressive\Router\Middleware namespace.
    • ๐Ÿ—„ #581 deprecates the following methods from Zend\Expressive\Application:

      • pipeRoutingMiddleware()
      • pipeDispatchMiddleware()
      • getContainer(): this method is removed in version 3; container access will only be via the bootstrap.
      • getDefaultDelegate(): the concept of a default delegate is removed in version 3.
      • getEmitter(): emitters move to a different collaborator in version 3.
      • injectPipelineFromConfig() andd injectRoutesFromConfig() are methods defined by the ApplicationConfigInjectionTrait, which will be removed in version 3. Use the ApplicationConfigInjectionDelegator instead.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • Nothing.
  • v2.1.1 Changes

    March 09, 2018

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • #583 provides a number of minor fixes and test changes to ensure the component works with the zend-expressive-router 2.4 version. In particular, configuration-driven routes will now work properly across all versions, without deprecation notices.

    • ๐Ÿ›  #582 fixes redirects in the documentation.

  • v2.1.0 Changes

    December 11, 2017

    โž• Added

    • โšก๏ธ #480 updates the ImplicitHeadMiddleware to add a request attribute indicating the request was originally generated for a HEAD request before delegating the request; you can now pull the attribute Zend\Expressive\Middleware\ImplicitHeadMiddleware::FORWARDED_HTTP_METHOD_ATTRIBUTE in your own middleware in order to vary behavior in these scenarios.

    ๐Ÿ”„ Changed

    • #505 modifies Zend\Expressive\Application to remove implementation of __call() in favor of the following new methods:

      • get($path, $middleware, $name = null)
      • post($path, $middleware, $name = null)
      • put($path, $middleware, $name = null)
      • patch($path, $middleware, $name = null)
      • delete($path, $middleware, $name = null)

    This change is an internal implementation detail only, and will not affect existing implementations or extensions.

    • #511 modifies the NotFoundDelegate to accept an optional $layout argument to its constructor; the value defaults to layout::default if not provided. That value will be passed for the layout template variable when the delegate renders a template, allowing zend-view users (and potentially other template systems) to customize the layout template used for reporting errors.

    You may provide the template via the configuration zend-expressive.error_handler.layout.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • Nothing.
  • v2.0.6 Changes

    December 11, 2017

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • #534 provides a fix for how it detects callable middleware. Previously, it relied on PHP's is_callable(), but that function can result in false positives when provided a 2-element array where the first element is an object, as the function does not verify that the second argument is a valid method of the first. We now implement additional verifications to prevent such false positives.
  • v2.0.5 Changes

    October 09, 2017

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • #521 adds an explicit requirement on http-interop/http-middleware ^0.4.1 to the package. This is necessary as newer builds of zend-stratigility instead depend on the metapackage webimpress/http-middleware-compatibility instead of the http-interop/http-middleware package โ€” but middleware shipped in Expressive requires it. This addition fixes problems due to missing http-middleware interfaces.
  • v2.0.4 Changes

    October 09, 2017

    โž• Added

    • #508 adds documentation covering Zend\Expressive\Helper\ContentLengthMiddleware, introduced in zend-expressive-helpers 4.1.0.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #479 fixes the WhoopsErrorResponseGenerator::$whoops dockblock Type to support Whoops 1 and 2.
    • ๐Ÿ›  #482 fixes the Application::$defaultDelegate dockblock Type.
    • ๐Ÿ›  #489 fixes an edge case in the WhoopsErrorHandler whereby it would emit an error if $_SERVER['SCRIPT_NAME'] did not exist. It now checks for that value before attempting to use it.
  • v2.0.3 Changes

    March 28, 2017

    โž• Added

    • Nothing.

    ๐Ÿ”„ Changed

    • โšก๏ธ #468 updates references to DefaultDelegate::class to instead use the string 'Zend\Expressive\Delegate\DefaultDelegate'; using the string makes it clear that the service name does not resolve to an actual class.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #476 fixes the WhoopsErrorResponseGenerator to ensure it returns a proper error status code, instead of using a 200 OK status.
  • v2.0.2 Changes

    March 13, 2017

    โž• Added

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #467 fixes an issue when passing invokable, duck-typed, interop middleware to the application without registering it with the container. Prior to the patch, it was incorrectly being decorated by Zend\Stratigility\Middleware\CallableMiddlewareWrapper instead of Zend\Stratigility\Middleware\CallableInteropMiddlewareWrapper.
  • v2.0.1 Changes

    March 09, 2017

    โž• Added

    • Nothing.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • Nothing.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  #464 fixes the WhoopsErrorResponseGenerator to provide a correct Content-Type header to the response when a JSON request occurs.
  • v2.0.0 Changes

    March 07, 2017

    โž• Added

    • ๐Ÿ‘ #450 adds support for PSR-11; Expressive is now a PSR-11 consumer.

    • โšก๏ธ #428 updates the zend-stratigility dependency to require ^2.0; this allows usage of both the new middleare-based error handling system introduced in zend-stratigility 1.3, as well as usage of http-interop/http-middleware implementations with Expressive. The following middleware is now supported:

      • Implementations of Interop\Http\ServerMiddleware\MiddlewareInterface.
      • Callable middleware that implements the same signature as Interop\Http\ServerMiddleware\MiddlewareInterface.
      • Callable middleware using the legacy double-pass signature (function ($request, $response, callable $next)); these are now decorated in Zend\Stratigility\Middleware\CallableMiddlewareWrapper instances.
      • Service names resolving to any of the above.
      • Arrays of any of the above; these will be cast to Zend\Stratigility\MiddlewarePipe instances, piping each middleware.
    • #396 adds Zend\Expressive\Middleware\NotFoundHandler, which provides a way to return a templated 404 response to users. This middleware should be used as innermost middleware. You may use the new Zend\Expressive\Container\NotFoundHandlerFactory to generate the instance via your DI container.

    • #396 adds Zend\Expressive\Container\ErrorHandlerFactory, for generating a Zend\Stratigility\Middleware\ErrorHandler to use with your application. If a Zend\Expressive\Middleware\ErrorResponseGenerator service is present in the container, it will be used to seed the ErrorHandler with a response generator. If you use this facility, you should enable the zend-expressive.raise_throwables configuration flag.

    • #396 adds Zend\Expressive\Middleware\ErrorResponseGenerator and Zend\Expressive\Middleware\WhoopsErrorResponseGenerator, which may be used with Zend\Stratigility\Middleware\ErrorHandler to generate error responses. The first will generate templated error responses if a template renderer is composed, and the latter will generate Whoops output. You may use the new Zend\Expressive\Container\ErrorResponseGeneratorFactory and Zend\Expressive\Container\WhoopsErrorResponseGeneratorFactory, respectively, to create these instances; if you do, assign these to the service name Zend\Expressive\Middleware\ErrorResponseGenerator to have them automatically registered with the ErrorHandler.

    • #396 adds Zend\Expressive\ApplicationConfigInjectionTrait, which exposes two methods, injectRoutesFromConfig() and injectPipelineFromConfig(); this trait is now composed into the Application class. These methods allow you to configure an Application instance from configuration if desired, and are now used by the ApplicationFactory to configure the Application instance.

    • #396 adds a vendor binary, vendor/bin/expressive-tooling, which will install (or uninstall) the zend-expressive-tooling; this package provides migration tools for updating your application to use programmatic pipelines and the new error handling strategy, as well as tools for identifying usage of the legacy Stratigility request and response decorators and error middleware.

    • #413 adds the middleware Zend\Expressive\Middleware\ImplicitHeadMiddleware; this middleware can be used to provide implicit support for HEAD requests when the matched route does not explicitly support the method.

    • #413 adds the middleware Zend\Expressive\Middleware\ImplicitOptionsMiddleware; this middleware can be used to provide implicit support for OPTIONS requests when the matched route does not explicitly support the method; the returned 200 response will also include an Allow header listing allowed HTTP methods for the URI.

    • #426 adds the method Application::getRoutes(), which will return the list of Zend\Expressive\Router\Route instances currently registered with the application.

    • #428 adds the class Zend\Expressive\Delegate\NotFoundDelegate, an Interop\Http\ServerMiddleware\DelegateInterface implementation. The class will return a 404 response; if a TemplateRendererInterface is available and injected into the delegate, it will provide templated contents for the 404 response as well. We also provide Zend\Expressive\Container\NotFoundDelegateFactory for providing an instance.

    • #428 adds the method Zend\Expressive\Application::getDefaultDelegate(). This method will return the default Interop\Http\ServerMiddleware\DelegateInterface injected during instantiation, or, if none was injected, lazy load an instance of Zend\Expressive\Delegate\NotFoundDelegate.

    • #428 adds the constants DISPATCH_MIDDLEWARE and ROUTING_MIDDLEWARE to Zend\Expressive\Application; they have identical values to the constants previously defined in Zend\Expressive\Container\ApplicationFactory.

    • #428 adds Zend\Expressive\Middleware\LazyLoadingMiddleware; this essentially extracts the logic previously used within Zend\Expressive\Application to provide container-based middleware to allow lazy-loading only when dispatched.

    ๐Ÿ”„ Changes

    • #440 changes the Zend\Expressive\Application::__call($method, array $args) signature; in previous versions, $args did not have a typehint. If you are extending the class and overriding this method, you will need to update your signature accordingly.

    • โšก๏ธ #428 updates Zend\Expressive\Container\ApplicationFactory to ignore the zend-expressive.raise_throwables configuration setting; Stratigility 2.X no longer catches exceptions in its middleware dispatcher, making the setting irrelevant.

    • โšก๏ธ #422 updates the zend-expressive-router minimum supported version to 2.0.0.

    • #428 modifies the Zend\Expressive\Container\ApplicationFactory constants DISPATCH_MIDDLEWARE and ROUTING_MIDDLEWARE to define themselves based on the constants of the same name now defined in Zend\Expressive\Application.

    • #428 modifies the constructor of Zend\Expressive\Application; the third argument was previously a nullable callable $finalHandler; it is now a nullable Interop\Http\ServerMiddleware\DelegateInterface with the name $defaultDelegate.

    • #450 modifies the signatures in several classes to typehint against PSR-11 instead of container-interop; these include:

      • Zend\Expressive\AppFactory::create()
      • Zend\Expressive\Application::__construct()
      • Zend\Expressive\Container\ApplicationFactory::__invoke()
      • Zend\Expressive\Container\ErrorHandlerFactory::__invoke()
      • Zend\Expressive\Container\ErrorResponseGeneratorFactory::__invoke()
      • Zend\Expressive\Container\NotFoundDelegateFactory::__invoke()
      • Zend\Expressive\Container\NotFoundHandlerFactory::__invoke()
      • Zend\Expressive\Container\WhoopsErrorResponseGeneratorFactory::__invoke()
      • Zend\Expressive\Container\WhoopsFactory::__invoke()
      • Zend\Expressive\Container\WhoopsPageHandlerFactory::__invoke()
    • #450 changes the interface inheritance of Zend\Expressive\Container\Exception\InvalidServiceException to extend Psr\Container\ContainerExceptionInterface instead of Interop\Container\Exception\ContainerException.

    ๐Ÿ—„ Deprecated

    • Nothing.

    โœ‚ Removed

    • ๐Ÿšš #428 removes the following routing/dispatch methods from Zend\Expressive\Application:

      • routeMiddleware(); this is now encapsulated in Zend\Expressive\Middleware\RouteMiddleware.
      • dispatchMiddleware(); this is now encapsulated in Zend\Expressive\Middleware\DispatchMiddleware.
    • ๐Ÿšš #428 removes the various "final handler" implementations and related factories. Users should now use the "default delegates" as detailed in sections previous. Classes and methods removed include:

      • Zend\Expressive\Application::getFinalHandler()
      • Zend\Expressive\TemplatedErrorHandler
      • Zend\Expressive\WhoopsErrorHandler
      • Zend\Expressive\Container\TemplatedErrorHandlerFactory
      • Zend\Expressive\Container\WhoopsErrorHandlerFactory
    • ๐Ÿšš #428 removes the Zend\Expressive\ErrorMiddlewarePipe class, as zend-stratigility 2.X no longer defines Zend\Stratigility\ErrorMiddlewareInterface or has a concept of variant-signature error middleware. Use standard middleware to provide error handling now.

    • ๐Ÿšš #428 removes the exception types Zend\Expressive\Container\Exception\InvalidArgumentException (use Zend\Expressive\Exception\InvalidArgumentException instead) and Zend\Expressive\Container\Exception\NotFoundException (which was never used internally).

    ๐Ÿ›  Fixed

    • Nothing.