ZF2-283: Incorrectly merging of DI.definition.class.instantiator
When two or more modules define the following definition the method (factory) becomes incorrectly uncallable...
return array( 'di' => array( 'definition' => array( 'class' => array( 'Zend\Cache\Storage\Adapter\Filesystem' => array( 'instantiator' => array( 'Zend\Cache\StorageFactory', 'factory', ), ), ), ), ), );
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.
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?