Expressive v2.2.0 Release Notes

Release Date: 2018-03-12 // about 6 years ago
  • โž• 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.