Open av3 opened 6 years ago
Right, this is a bug. A workaround:
'abstract_factories' => [
\Zend\Expressive\Navigation\Service\ExpressiveNavigationAbstractServiceFactory::class,
],
'aliases' => [
'navigation' => \Zend\Navigation\Navigation::class,
],
'factories' => [
Zend\Expressive\Navigation\Middleware\NavigationMiddleware::class => Zend\Expressive\Navigation\Middleware\NavigationMiddlewareFactory::class,
],
(without the factory ExpressiveNavigationFactory
)
Thank you! Then I have to use Zend\Navigation\Footer
for the view helper (even if I use 'footer' with a small f for the key) and I'm getting my footer navigation. :)
The current idea is to remove the ExpressiveNavigationFactory
because the abstract factory (ExpressiveNavigationAbstractServiceFactory
) can do all the work with the same result.
I have already written some unit tests but some tests in an application are required.
Hello froschdesign,
currently I have a project where I use the "old" https://github.com/froschdesign/zend-navigation/tree/feature/expressive-support for using Zend-Navigation with multiple navigations in Expressive.
Because I wanted to switch to Zend Expressive 3 (which isn't compatible to the old branch), I wanted to switch to this zend-expressive-navigation and already tested the newest version with your quickstart description.
If I have only one "default" key in my configuration array, everything works fine. But if I add a "footer" key (with an empty array, without pages), I get an error message (also without trying to call the view helper for that navigation):
In my ConfigAggregator I have
This was the first error without any pages; if the default key has an empty array as value, there is no error, just an empty navigation output.
Then I added a page to my footer array. Example:
No I get the another exception: