9.8 KiB
Changelog
All notable changes to this project will be documented in this file, in reverse chronological order by release.
2.4.1 - 2018-03-08
Added
- Nothing.
Changed
- #63
improves the deprecation notice raised by the
Zend\Expressive\Router\Route
constructor when non-middleware interface implementations are passed for the$middleware
argument. The message not contains the path, HTTP methods, and middleware type that were used to create theRoute
instance.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
2.4.0 - 2018-03-08
Added
-
#54 adds the middleware
Zend\Expressive\Router\Middleware\DispatchMiddleware
andZend\Expressive\Router\Middleware\RouteMiddleware
. These are the same as the versions shipped in 2.3.0, but under a new namespace. -
#55 adds
Zend\Expressive\Router\Middleware\ImplicitHeadMiddleware
. It is imported from zend-expressive, and implements the same functionality. -
#55 adds
Zend\Expressive\Router\Middleware\ImplicitOptionsMiddleware
. It is imported from zend-expressive, and implements the same functionality. -
#57 adds the following factories for use with PSR-11 containers:
- Zend\Expressive\Router\Middleware\DispatchMiddlewareFactory`
- Zend\Expressive\Router\Middleware\ImplicitHeadMiddlewareFactory`
- Zend\Expressive\Router\Middleware\ImplicitOptionsMiddlewareFactory`
- Zend\Expressive\Router\Middleware\RouteMiddlewareFactory`
-
#57 adds
Zend\Expressive\Router\ConfigProvider
, mapping the above factories to their respective middleware, and exposing it to zend-component-installer via the package definition.
Changed
- Nothing.
Deprecated
-
#56 deprecates the method
Zend\Expressive\RouteResult::getMatchedMiddleware()
, as it will be removed in version 3. If you need access to the middleware, usegetMatchedRoute()->getMiddleware()
. (In version 3, theRouteResult
is middleware, and will proxy to it.) -
#56 deprecates passing non-MiddlewareInterface instances to the constructor of
Zend\Expressive\Route
. The class now triggers a deprecation notice when this occurs, indicating the changes the developer needs to make. -
#54 deprecates the middleware
Zend\Expressive\Router\DispatchMiddleware
andZend\Expressive\Router\RouteMiddleware
. The final versions in the v3 release will be under theZend\Expressive\Router\Middleware
namespace; please use those instead. -
#55 deprecates two methods in
Zend\Expressive\Router\Route
:implicitHead()
implicitOptions()
Starting in 3.0.0, implementations will need to return route result failures that include all allowed methods when matching
HEAD
orOPTIONS
implicitly.
Removed
- Nothing.
Fixed
- Nothing.
2.3.0 - 2018-02-01
Added
-
#46 adds two new middleware, imported from zend-expressive and re-worked for general purpose usage:
-
Zend\Expressive\Router\RouteMiddleware
composes a router and a response prototype. When processed, if no match is found due to an un-matched HTTP method, it uses the response prototype to create a 405 response with anAllow
header listing allowed methods; otherwise, it dispatches to the next middleware via the provided handler. If a match is made, the route result is stored as a request attribute using theRouteResult
class name, and each matched parameter is also added as a request attribute before delegating request handling. -
Zend\Expressive\Router\DispatchMiddleware
checks for aRouteResult
attribute in the request. If none is found, it delegates handling of the request to the handler. If one is found, it pulls the matched middleware and processes it. If the middleware is not http-interop middleware, it raises an exception.
-
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
2.2.0 - 2017-10-09
Added
- #36 adds support for http-interop/http-middleware 0.5.0 via a polyfill provided by the package webimpress/http-middleware-compatibility. Essentially, this means you can drop this package into an application targeting either the 0.4.1 or 0.5.0 versions of http-middleware, and it will "just work".
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
2.1.0 - 2017-01-24
Added
- #32 adds
support for http-interop/http-middleware
server middleware in
Route
instances.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
2.0.0 - 2017-01-06
Added
- #6 modifies
RouterInterface::generateUri
to support an$options
parameter, which may pass additional configuration options to the actual router. - #21 makes the configured path definition
accessible in the
RouteResult
.
Deprecated
- Nothing.
Removed
- Removed
RouteResultObserverInterface
andRouteResultSubjectInterface
, as they were deprecated in 1.2.0.
Fixed
- Nothing.
1.3.2 - 2016-12-14
Added
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #29 removes
the patch introduced with #27
and 1.3.1, as it causes
Zend\Expressive\Application
to raise exceptions regarding duplicate routes, and because some implementations, including FastRoute, also raise errors on duplication. It will be up to individual routers to determine how to handle implicit HEAD and OPTIONS support.
1.3.1 - 2016-12-13
Added
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #27 fixes
the behavior of
Route
to always registerHEAD
andOPTIONS
as allowed methods; this was the original intent of #24.
1.3.0 - 2016-12-13
Added
-
#23 adds a new static method on the
RouteResult
class,fromRoute(Route $route, array $params = [])
, for creating a newRouteResult
instance. It also addsgetMatchedRoute()
for retrieving theRoute
instance provided to that method. Doing so allows retrieving the list of supported HTTP methods, path, and route options from the matched route. -
#24 adds two new methods to the
Route
class,implicitHead()
andimplicitOptions()
. These can be used by routers or dispatchers to determine if a match based onHEAD
orOPTIONS
requests was due to the developer specifying the methods explicitly when creating the route (theimplicit*()
methods will returnfalse
if explicitly specified).
Deprecated
- #23
deprecates
RouteResult::fromRouteMatch()
in favor of the newfromRoute()
method.
Removed
- Nothing.
Fixed
- Nothing.
1.2.0 - 2016-01-18
Added
- Nothing.
Deprecated
- #5
deprecates both
RouteResultObserverInterface
andRouteResultSubjectInterface
. The changes introduced in zend-expressive #270 make the system obsolete. The interfaces will be removed in 2.0.0.
Removed
- Nothing.
Fixed
- Nothing.
1.1.0 - 2015-12-06
Added
- #4 adds
RouteResultSubjectInterface
, a complement toRouteResultObserverInterface
, defining the following methods:attachRouteResultObserver(RouteResultObserverInterface $observer)
detachRouteResultObserver(RouteResultObserverInterface $observer)
notifyRouteResultObservers(RouteResult $result)
Deprecated
- Nothing.
Removed
- #4 removes
the deprecation notice from
RouteResultObserverInterface
.
Fixed
- Nothing.
1.0.1 - 2015-12-03
Added
- Nothing.
Deprecated
- #3 deprecates
RouteResultObserverInterface
, which has been moved to theZend\Expressive
namespace and package.
Removed
- Nothing.
Fixed
- #1 fixes the coveralls support to trigger after scripts, so the status of the check does not make the tests fail. Additionally, ensured that coveralls can receive the coverage report!
1.0.0 - 2015-12-02
First stable release.
See the [Expressive CHANGELOG](https://github.com/zendframework/zend-expressive/blob/master/CHANGELOG.md] for a history of changes prior to 1.0.