zendframework/ZendSkeletonApplication — pull request #198 by ptahdunbar (2013-06-28 17:34:30+00:00)
Title: Fatal error when using with ZFTool

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')
#1 /Users/ptah/Sites/zf2SkeletonApp.dev/vendor/zendframework/zendframework/library/Zend/ModuleManager/Listener/ServiceListener.php(223): Zend\ServiceManager\Config->configureServiceManager(Object(Zend\ServiceManager\ServiceManager))
#2 [internal function]: Zend\ModuleManager\Listener\ServiceListener->onLoadModulesPost(Object(Zend\ModuleManager\ModuleEvent))
#3 /Users/ptah/Sites/zf2SkeletonApp.dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\ModuleManager\ModuleEvent))
#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 :)