Proposed zend-expressive-router changes include:
-
Adding a
$path
parameter toRouteResult::fromRouteMatch()
.What if instead we were to add a new static method,
RouteResult::fromRoute()
, and a new instance method,RouteResult::getRoute()
? (as I have suggested in zendframework/zend-expressive#398)? This would allow consumers to then pull the path from theRoute
instead, and provide access to the path, name, allowed methods, options, etc. (e.g.,$result->getRoute()->getPath()
)This could even be done in a new 1.3.0 minor release; users who depend on that new feature would need to update their project to pin to the new minor release or later; otherwise, everything continues working as normal.