Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

Added module config opts to complement PR in ZF2 #1

Merged
merged 1 commit into from
Oct 10, 2011
Merged

Added module config opts to complement PR in ZF2 #1

merged 1 commit into from
Oct 10, 2011

Conversation

zucchi
Copy link
Contributor

@zucchi zucchi commented Oct 10, 2011

Added module config opts to complement PR in ZF2

@EvanDotPro EvanDotPro merged commit d60fa20 into zendframework:master Oct 10, 2011
@EvanDotPro
Copy link
Member

Reviewed and merged into master, thanks!

weierophinney referenced this pull request in weierophinney/ZendSkeletonApplication Feb 14, 2012
- Updated ZF2 to rev db6a6e3
- Modified configuration to use AggregateResolver
Maks3w pushed a commit that referenced this pull request Nov 5, 2012
ptahdunbar pushed a commit to ptahdunbar/ZendSkeletonApplication that referenced this pull request Jun 28, 2013
When using the ZendSkeletonApp along with ZFTool, the translator throws a fatal error due to an alias clash.

ZFTool registers the translator as a factory service, and with the skeleton app aliasing "translator", it throws:
```
Uncaught exception 'Zend\ServiceManager\Exception\InvalidServiceNameException' with message 'An alias by the name "translator" or "translator" already exists' in /Users/ptah/Sites/zf2SkeletonApp.dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:756
Stack trace:
#0 /Users/ptah/Sites/zf2SkeletonApp.dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/Config.php(150): Zend\ServiceManager\ServiceManager->setAlias('translator', 'MvcTranslator')
zendframework#1 /Users/ptah/Sites/zf2SkeletonApp.dev/vendor/zendframework/zendframework/library/Zend/ModuleManager/Listener/ServiceListener.php(223): Zend\ServiceManager\Config->configureServiceManager(Object(Zend\ServiceManager\ServiceManager))
zendframework#2 [internal function]: Zend\ModuleManager\Listener\ServiceListener->onLoadModulesPost(Object(Zend\ModuleManager\ModuleEvent))
zendframework#3 /Users/ptah/Sites/zf2SkeletonApp.dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\ModuleManager\ModuleEvent))
zendframework#4 /Users/ptah/Sites/zf2 in /Users/ptah/Sites/zf2SkeletonApp.dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 756
```

The fix is to register the translator as a factory service within the skeleton app so zf2 can have fun overriding config definitions :)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants