@@ -738,3 +738,58 @@ entries for each will be injected into your generated pipeline.
738738
739739Please see the [ chapter on the implicit methods middleware] ( ../../features/middleware/implicit-methods-middleware.md )
740740for more information on each.
741+
742+ ## Router interface changes
743+
744+ Expressive 2.0 uses zendframework/zend-expressive-router 2.1+. Version 2.0 of
745+ that package introduced a change to the ` Zend\Expressive\Router\RouterInterface::generateUri() `
746+ method; it now accepts an additional, optional, third argument, ` array $options = [] ` ,
747+ which can be used to pass router-specific options when generating a URI. As an
748+ example, the implementation that uses zendframework/zend-router might use these
749+ options to pass a translator instance in order to translate a path segment to
750+ the currently selected locale.
751+
752+ For consumers, his represents no backwards-incompatible change; consumers may
753+ opt-in to the new argument at will. For those implementing the interface,
754+ upgrading will require updating your router implementation's signature to match
755+ the new interface:
756+
757+ ``` php
758+ public function generateUri(
759+ string $name,
760+ array $substitutions = [],
761+ array $options = []
762+ ) : string
763+ ```
764+
765+ ## URL helper changes
766+
767+ Expressive 2.0 uses zendframework/zend-expressive-helpers version 3.0+. This new
768+ version updates the signature of the ` Zend\Expressive\Helper\UrlHelper ` from:
769+
770+ ``` php
771+ function (
772+ $routeName,
773+ array $routeParams = []
774+ ) : string
775+ ```
776+
777+ to:
778+
779+ ``` php
780+ function (
781+ $routeName,
782+ array $routeParams = [],
783+ $queryParams = [],
784+ $fragmentIdentifier = null,
785+ array $options = []
786+ ) : string
787+ ```
788+
789+ For consumers, this should represent a widening of features, and will not
790+ require any changes, unless you wish to opt-in to the new arguments. See the
791+ [ UrlHelper documentation] ( ../../features/helpers/url-helper.md ) for information
792+ on each argument.
793+
794+ For any users who were _ extending_ the class, you will need to update your
795+ extension accordingly.
0 commit comments