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

Commit

Permalink
Add Log, Cache abstract factories
Browse files Browse the repository at this point in the history
- Allows us to remove these from the default MVC service configuration
  so that we do not need to add additional dependencies to that
  component.
  • Loading branch information
weierophinney committed May 2, 2013
1 parent ede1e9b commit 80884b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/Application/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
),
),
'service_manager' => array(
'abstract_factories' => array(
'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
'Zend\Log\LoggerAbstractServiceFactory',
),
'factories' => array(
'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory',
),
Expand Down

3 comments on commit 80884b7

@aaronholmes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weierophinney - It looks like this commit is resulting in an error for me. I filled out an issue but maybe you have a better idea of what's up. Here's my error:

PHP Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\InvalidArgumentException' with message 'Provided abstract factory must be the class name of an abstract factory or an instance of an AbstractFactoryInterface.' in /var/www/zf2-tutorial/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:302\nStack trace:\n#0 /var/www/zf2-tutorial/vendor/zendframework/zendframework/library/Zend/ServiceManager/Config.php(126): Zend\ServiceManager\ServiceManager->addAbstractFactory('Zend\Cache\Serv...')\n#1 /var/www/zf2-tutorial/vendor/zendframework/zendframework/library/Zend/ModuleManager/Listener/ServiceListener.php(223): Zend\ServiceManager\Config->configureServiceManager(Object(Zend\ServiceManager\ServiceManager))\n#2 [internal function]: Zend\ModuleManager\Listener\ServiceListener->onLoadModulesPost(Object(Zend\ModuleManager\ModuleEvent))\n#3 /var/www/zf2-tutorial/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(472): call_user_func(Array, Object(Zend\ModuleManager\Module in /var/www/zf2-tutorial/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 302

This is running on Ubuntu 13.04 Apache 2.2.22 PHP 5.4.9. I'm using the sample http conf and newest version of composer.

I'm new to ZF2 so it may be something obvious on my part. Checking out v2.1 works fine though. Thanks!

@weierophinney
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronholmes This is because the changes only exist on ZF2 2.2.0rc1 currently, which Composer doesn't recognize as a stable version, and thus it installs a 2.1 series of ZF2. For now, use a 2.1 tag of the skeleton application.

@aaronholmes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weierophinney Ah, now this makes sense. Thank you sir!

Please sign in to comment.