Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Ensure DiAbstractServiceFactory takes lowest possible priority #5180

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

grncdr commented Sep 27, 2013

I'm far from expert on all the intricacies of Zend\Di, but this
seemed necessary for my application.

AFAICT, the Zend\ServiceManager\Di\DiAbstractServiceFactory
will be lazily added to the shared ServiceManager at an unpredictable
time. The default behaviour of addAbstractFactory puts this new
abstract factory in front of abstract factories from modules, which leads
to the DiAbstractFactory trying to create things before module-defined
abstract factories get a chance.

Ensure DiAbstractServiceFactory takes lowest possible priority
A `Zend\Di` abstract factory should always be checked *after*
abstract factories from modules.
Contributor

grncdr commented Sep 27, 2013

The Travis failure above looks unrelated: https://travis-ci.org/zendframework/zf2/jobs/11851852#L183

Member

Ocramius commented Oct 17, 2013

👍 to this

Contributor

grncdr commented Oct 17, 2013

Who do I need to @ reply on this to get it merged?

Member

Ocramius commented Oct 17, 2013

@grncdr you need to wait for someone of the CR team. If you rely on it, then please use your fork for now.

Owner

weierophinney commented Oct 23, 2013

Can you add tests for this -- essentially, show adding other abstract factories around adding this will result in DI being the last called? I worry we'll miss this in a future changeset.

Owner

weierophinney commented Oct 23, 2013

Actually, belay that last comment. Merging.

weierophinney added a commit that referenced this pull request Oct 23, 2013

Merge pull request #5180 from grncdr/patch-1
Ensure DiAbstractServiceFactory takes lowest possible priority

weierophinney added a commit that referenced this pull request Oct 23, 2013

@ghost ghost assigned weierophinney Oct 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment