Expressive v1.1.0 Release Notes
Release Date: 2017-02-13 // about 7 years ago-
โ Added
- #309 adds the
ability to provide options with which to instantiate the
FinalHandler
instance, via the configuration:
[ 'final_handler' => [ 'options' => [ /* array of options */ ], ],
#373 adds interception of exceptions from the
ServerRequestFactory
for invalid request information in order to return400
responses.#432 adds two new configuration flags for use with
Zend\Expressive\Container\ApplicationFactory
:zend-expressive.programmatic_pipelines
: when enabled, the factory will ignore themiddleware_pipeline
androutes
configuration, allowing you to wire these programmatically instead. We recommend creating these in the filesconfig/pipeline.php
andconfig/routes.php
, respectively, and modifying yourpublic/index.php
torequire
these files in statements immediately preceding the call to$app->run()
.zend-expressive.raise_throwables
: when enabled, this will be used to notify zend-stratigility's internal dispatcher to no longer catch exceptions/throwables, and instead allow them to bubble out. This allows you to write custom middleware for handling errors.
#429 adds
Zend\Expressive\Application::getDefaultDelegate()
as a forwards-compatibility measure for the upcoming version 2.0.0. Currently, it proxies togetFinalHandler()
.๐ #435 adds support for the 2.X versions of zend-expressive-router and the various router implementations. This change also allows usage of zend-expressive-helpers 3.X.
๐ Changed
โก๏ธ #429 updates the minimum supported zend-stratigility version to 1.3.3.
โก๏ธ #396 updates the
Zend\Expressive\Container\ApplicationFactory
to vary creation of theApplication
instance based on two new configuration variables:zend-expressive.programmatic_pipeline
will cause the factory to skip injection of the middleware pipeline and routes from configuration. It is then up to the developer to do so, or use theApplication
API to pipe middleware and/or add routed middleware.zend-expressive.raise_throwables
will cause the factory to call the newraiseThrowables()
method exposed byApplication
(and inherited fromZend\Stratigility\MiddlewarePipe
). Doing so will cause the application to raise anyThrowable
orException
instances caught, instead of catching them and dispatching them to (legacy) Stratigility error middleware.
๐ Deprecated
- ๐ #429 deprecates
the following methods and classes:
Zend\Expressive\Application::pipeErrorHandler()
; use theraise_throwables
flag and standard middleware to handle errors instead.Zend\Expressive\Application::routeMiddleware()
; this is extracted to a dedicated middleware class for 2.0.Zend\Expressive\Application::dispatchMiddleware()
; this is extracted to a dedicated middleware class for 2.0.Zend\Expressive\Application::getFinalHandler()
(this patch providesgetDefaultDelegate()
as a forwards-compatibility measure)Zend\Expressive\Container\Exception\InvalidArgumentException
; this will be removed in 2.0.0, and places where it was used will instead throwZend\Expressive\Exception\InvalidArgumentException
.Zend\Expressive\Container\Exception\NotFoundException
; this exception is never thrown at this point.Zend\Expressive\Container\TemplatedErrorHandlerFactory
Zend\Expressive\Container\WhoopsErrorHandlerFactory
Zend\Expressive\ErrorMiddlewarePipe
; Stratigility 1.3 deprecates itsZend\Stratigility\ErrorMiddlewareInterface
, and removes it in version 2.0. use theraise_throwables
flag and standard middleware to handle errors instead.Zend\Expressive\TemplatedErrorHandler
; the "final handler" concept is retired in Expressive 2.0, and replaced with default delegates (classes implementingInterop\Http\ServerMiddleware\DelegateInterface
that will be executed when the internal pipeline is exhausted, in order to guarantee a response). If you are using custom final handlers, you will need to rewrite them when adopting Expressive 2.0.Zend\Expressive\WhoopsErrorHandler
โ Removed
- ๐ #406 removes the
RouteResultSubjectInterface
implementation fromZend\Expressive\Application
, per the deprecation prior to the 1.0 stable release.
๐ Fixed
- ๐ #442 fixes how
the
WhoopsFactory
disables JSON output for whoops; previously, providing booleanfalse
values for either of the configuration flagsjson_exceptions.show_trace
orjson_exceptions.ajax_only
would result in enabling the settings; these flags are now correctly evaluated by theWhoopsFactory
.
- #309 adds the
ability to provide options with which to instantiate the