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

Updating Application\Module to be compatible with current Module Manager #3

Closed
wants to merge 1 commit into from

Conversation

Ocramius
Copy link
Member

The application just won't work when cloning the repository with --recursive.
This patch should solve it.

@EvanDotPro
Copy link
Member

I was unable to re-produce this after doing a fresh clone. As discussed in IRC, your include path may be wrong or the ZF2 submodule could be out of date, causing you to be using an older version of ZF2, before we allowed returning arrays from Module::getConfig();

@Ocramius
Copy link
Member Author

Checked, it's fine. My fault, sorry :)

@Ocramius Ocramius closed this Nov 12, 2011
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 :)
samsonasik pushed a commit to samsonasik/ZendSkeletonApplication that referenced this pull request Apr 20, 2016
…3-minimal

ZendSkeletonApplication#329 feedbacks
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.

2 participants