Issue Type: Bug Created: 2012-05-01T13:59:00.000+0000 Last Updated: 2012-10-08T20:15:19.000+0000 Status: Closed Fix version(s): Reporter: Bas K (bas) Assignee: Ralph Schindler (ralph) Tags: - Zend\Di
Related issues: Attachments:
When two or more modules define the following definition the method (factory) becomes incorrectly uncallable...
<pre class="highlight"> return array( 'di' => array( 'definition' => array( 'class' => array( 'Zend\Cache\Storage\Adapter\Filesystem' => array( 'instantiator' => array( 'Zend\Cache\StorageFactory', 'factory', ), ), ), ), ), ); <pre class="literal"> Fatal error: Uncaught exception 'RuntimeException' with message 'Invalid instantiator: Zend\Cache\StorageFactory::factory() is not callable.' in /vendor/ZendFramework/library/Zend/Di/Di.php:198
On investigation is seems the 'instantiator' array is merged incorrectly, as it contents will be the following, which is indeed not a valid PHP callback.
<pre class="highlight"> Array (  => Zend\Cache\StorageFactory  => factory  => Zend\Cache\StorageFactory  => factory )
I am unsure how to resolve such a configuration. Should DI assume the first two keys as correct?
Posted by Ralph Schindler (ralph) on 2012-10-08T20:15:19.000+0000
This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2474
Have you found an issue?
See the Overview section for more details.