Open amirsourette opened 2 years ago
@amirsourette laminas-mvc with version 2 is no longer supported with this component because laminas-mvc itself is outdated since years. You can stay with version 2.12 of laminas-navigation and you will not miss any feature, so far.
I will add a conflict to composer.json
.
Ok. It is noted, thx. This is what I had already done.
Bug Report
Summary
BC due to the fact that the navigation factory doesn't accept Laminas\Mvc\Router anymore
Current behavior
We have the exception below :
Fatal error: Uncaught Laminas\Navigation\Exception\InvalidArgumentException: Laminas\Router\RouteMatch expected by Laminas\Navigation\Service\AbstractNavigationFactory::injectComponents; received Laminas\Mvc\Router\Http\RouteMatch in /home/aa/g4account2/vendor/laminas/laminas-navigation/src/Service/AbstractNavigationFactory.php:188 Stack trace: #0 /home/aa/g4account2/vendor/laminas/laminas-navigation/src/Service/AbstractNavigationFactory.php(148): Laminas\Navigation\Service\AbstractNavigationFactory->validateRouteMatch() #1 /home/aa/g4account2/vendor/laminas/laminas-navigation/src/Service/AbstractNavigationFactory.php(106): Laminas\Navigation\Service\AbstractNavigationFactory->injectComponents() #2 /home/aa/g4account2/vendor/laminas/laminas-navigation/src/Service/AbstractNavigationFactory.php(84): Laminas\Navigation\Service\AbstractNavigationFactory->preparePages() #3 /home/aa/g4account2/vendor/laminas/laminas-navigation/src/Service/AbstractNavigationFactory.php(45): Laminas\Navigation\Service\AbstractNavigationFactory->g in /home/aa/g4account2/vendor/laminas/laminas-servicemanager/src/ServiceManager.php on line 940
How to reproduce
After composer update on one of my projects (laminas ^2.5 and php 7.4) the navigation factory throws and an exception because the routeMatch passed doesn't match the new requirements. Because of this change : https://github.com/laminas/laminas-navigation/pull/26/files#diff-bcfd4003dfd21da9b41c1dd63892153b763c701cc9ab1fee66c932378a344676R187
In effect, our application use the Router provided by the laminas/mvc module.
Below the dependencies to laminas
"php": ">=7.4", "laminas/laminas-cache": "^2.5", "laminas/laminas-i18n": "^2.5", "laminas/laminas-log": "^2.5", "laminas/laminas-modulemanager": "^2.5", "laminas/laminas-mvc": "^2.5", "laminas/laminas-authentication": "^2.5", "laminas/laminas-session": "^2.5", "laminas/laminas-servicemanager": "^2.5", "laminas/laminas-serializer": "^2.5", "laminas/laminas-soap": "^2.5", "laminas/laminas-json-server": "^3.1", "laminas/laminas-validator": "^2.5", "laminas/laminas-db": "^2.5", "laminas/laminas-paginator": "^2.5", "laminas/laminas-server": "^2.8.1", "laminas/laminas-navigation": "^2.9", "laminas/laminas-feed": "^2.5", "laminas/laminas-mail": "^2.5", "laminas/laminas-mime": "^2.5", "laminas/laminas-barcode": "^2.5", "laminas/laminas-captcha": "^2.5", "laminas/laminas-crypt": "^2.5", "laminas/laminas-xmlrpc": "^2.5", "laminas/laminas-memory": "^2.5", "laminas/laminas-xml": "^1.0", "laminas/laminas-progressbar": "^2.5", "laminas/laminas-dom": "^2.7.2", "laminas/laminas-dependency-plugin": "^2.2.0", "laminas/laminas-permissions-acl": "^2.7",
Expected behavior
Continue to accept Laminas\Mvc\Router\RouteStackInterface