froschdesign / zend-expressive-navigation

Page, middleware and factories for navigations in a zend-expressive application
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Unable to resolve service "Application" to a factory #4

Closed lowtower closed 6 years ago

lowtower commented 6 years ago

Hello @froschdesign,

I followed the quick-start from #2 and I get the following error:

Unable to resolve service "Application" to a factory;
are you certain you provided it during configuration?

In Zend\Navigation\Service\AbstractNavigationFactory the preparePages() method tries to fetch the Application from the container.

$application = $container->get('Application');

I have a zend-expressive-skeleton installation, so it should be there, shouldn't it?

Cheers, LT.

froschdesign commented 6 years ago

@lowtower Please follow my quick-start, because the config-provider from zend-navigation is not needed and wrong here!

https://github.com/froschdesign/zend-expressive-navigation/issues/2#issuecomment-414084853

lowtower commented 6 years ago

Ah,

okay, thanks a lot!

I followed Your quick-start. My problem was, that when zend-component-installer asks to inject the ConfigProvider I answered Yes for all, which includes zend-navigation also. Should be mentioned in the quick-start not to do so!

Cheers, LT.

froschdesign commented 6 years ago

@lowtower Thanks for feedback! 👍

froschdesign commented 6 years ago

My problem was, that when zend-component-installer asks to inject the ConfigProvider I answered Yes for all, which includes zend-navigation also.

Btw. this is an important point. I think we can eliminate this problem with the package zend-mvc-navigation.