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

Ensure DiAbstractServiceFactory takes lowest possible priority #5180

Closed
wants to merge 1 commit into from

Conversation

grncdr
Copy link
Contributor

@grncdr 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.

A `Zend\Di` abstract factory should always be checked *after*
abstract factories from modules.
@grncdr
Copy link
Contributor Author

grncdr commented Sep 27, 2013

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

@Ocramius
Copy link
Member

👍 to this

@grncdr
Copy link
Contributor Author

grncdr commented Oct 17, 2013

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

@Ocramius
Copy link
Member

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

@weierophinney
Copy link
Member

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.

@weierophinney
Copy link
Member

Actually, belay that last comment. Merging.

weierophinney added a commit that referenced this pull request Oct 23, 2013
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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants