zendframework / zend-mvc-console

Integration between zend-console, zend-router, zend-view, and zend-mvc
BSD 3-Clause "New" or "Revised" License
10 stars 16 forks source link

Fix check if `instanceof RouteMatch` (detected via static analysis) #21

Closed TysonAndre closed 6 years ago

TysonAndre commented 6 years ago

This check was always false. The old check was searching for \Zend\Mvc\Console\Service\RouteMatch, which doesn't exist.

setRouteMatch accepts \Zend\Router\RouteMatch or the legacy subclass:

The possibilities (From the Zend\View\Helper\Url code):

// MVC router extends RouteMatch.
use Zend\Mvc\Router\RouteMatch as LegacyRouteMatch;
use Zend\Router\RouteMatch;

Note: There were no unit tests of this case. Existing unit tests pass.

Ocramius commented 6 years ago

Still requires a test case addition

weierophinney commented 6 years ago

I've added a unit test at this time.