zend-expressive 2.2.0
Added
-
#581 adds the class
Zend\Expressive\ConfigProvider
, and exposes it to the zend-component-installer Composer plugin. We recommend updating yourconfig/config.php
to reference it, as well as theZend\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 inZend\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 ofZend\Expressive\Application
or aZend\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
: theNotFoundDelegate
will be renamed toZend\Expressive\Handler\NotFoundHandler
in version 3, making this factory obsolete. -
Zend\Expressive\Delegate\NotFoundDelegate
: this class becomesZend\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 theEmitterStack
class. Unless you are extending it or interacting with it directly, this change should not affect you; theZend\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 theZend\Expressive\Router\Middleware
namespace. -
Zend\Expressive\Middleware\ImplicitHeadMiddleware
: this functionality has been moved to zend-expressive-router, under theZend\Expressive\Router\Middleware
namespace. -
Zend\Expressive\Middleware\ImplicitOptionsMiddleware
: this functionality has been moved to zend-expressive-router, under theZend\Expressive\Router\Middleware
namespace. -
Zend\Expressive\Middleware\NotFoundHandler
: this will be removed in version 3, where you can instead pipeZend\Expressive\Handler\NotFoundHandler
directly instead. -
Zend\Expressive\Middleware\RouteMiddleware
: this functionality has been moved to zend-expressive-router, under theZend\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()
anddinjectRoutesFromConfig()
are methods defined by theApplicationConfigInjectionTrait
, which will be removed in version 3. Use theApplicationConfigInjectionDelegator
instead.
Removed
- Nothing.
Fixed
- Nothing.