Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Commit 2567c32caa7fe102f26b2ab59962b4eec9fa292c breaks BC #3537

Closed
mwillbanks opened this Issue · 7 comments

3 participants

@mwillbanks
Collaborator

I have not quite figured out why this actually breaks but I did a git bisect and found that the commit: 2567c32 causes the break in an existing application. Reverting this commit makes the existing app function as expected.

The following is the stack trace:
Fatal error: Uncaught exception 'Zend\Di\Exception\RuntimeException' with message 'Invalid instantiator of type "NULL" for "Zend\EventManager\SharedEventManagerInterface".' in /var/www/vendor/zendframework/zendframework/library/Zend/Di/Di.php:225
Stack trace:
#0 /var/www/vendor/zendframework/zendframework/library/Zend/Di/Di.php(154): Zend\Di\Di->newInstance('Zend\EventManag...', Array, true)
#1 /var/www/vendor/zendframework/zendframework/library/Zend/ServiceManager/Di/DiServiceFactory.php(105): Zend\Di\Di->get('Zend\EventManag...', Array)
#2 /var/www/vendor/zendframework/zendframework/library/Zend/ServiceManager/Di/DiAbstractServiceFactory.php(44): Zend\ServiceManager\Di\DiServiceFactory->get('Zend\EventManag...', Array, true)
#3 [internal function]: Zend\ServiceManager\Di\DiAbstractServiceFactory->createServiceWithName(Object(Zend\ServiceManager\ServiceManager), 'zendeventmanage...', 'Zend\EventManag...')
#4 /var/www/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(726): call_user_func(Ar in /var/www/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 733

@Ocramius
Collaborator

Yes, that's because the DiServiceInitializer tries to apply setter injection to all the instances produced by the Service manager.

I'm totally for removing the DiServiceInitializer (not the generic abstract factory btw)

@Ocramius
Collaborator

Basically, the DiServiceInitializer gets attached to the ServiceManager when $config['di'] is defined. This is a huge bottleneck. Let's remove it before hitting stable!

@weierophinney

Give me a PR @ocramius and I'll review. My only concern is: will removing that line cause a different set of breakage?

@Ocramius
Collaborator

@weierophinney not compared to current master. From what @mwillbanks said, this is dev-develop only

@weierophinney
@Ocramius Ocramius referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@weierophinney weierophinney referenced this issue from a commit
@weierophinney weierophinney Merge branch 'hotfix/issue-#3537-di-service-initializer-removal' of g…
…it://github.com/Ocramius/zf2 into hotfix/3545
53207e1
@mwillbanks
Collaborator

Thanks!

@mwillbanks mwillbanks closed this
@weierophinney weierophinney referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this issue from a commit
@weierophinney weierophinney Merge branch 'hotfix/issue-#3537-di-service-initializer-removal' of g…
…it://github.com/Ocramius/zf2 into hotfix/3545
d6d2497
@ghost Unknown referenced this issue from a commit
@weierophinney weierophinney Merge branch 'hotfix/3545' into develop
Close #3545
Fixes #3537
dddb9f8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.