This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
ServiceManager - fix AbstractFactories performance and service waiting #5237
Merged
weierophinney
merged 1 commit into
zendframework:develop
from
turrsis:hotfix/serviceManager-trollAbstractFactories(4285)
Oct 23, 2013
Merged
ServiceManager - fix AbstractFactories performance and service waiting #5237
weierophinney
merged 1 commit into
zendframework:develop
from
turrsis:hotfix/serviceManager-trollAbstractFactories(4285)
Oct 23, 2013
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Who can say - why tests for php 5.3.3 is failed? |
@turrsis don't worry about it - that's php-cs-fixer that stopped supporting PHP 5.3.3 |
@@ -700,35 +686,34 @@ public function has($name, $checkAbstractFactories = true, $usePeeringServiceMan | |||
* @param string $rName | |||
* @return bool | |||
*/ | |||
public function canCreateFromAbstractFactory($cName, $rName) | |||
protected function canCreateFromAbstractFactory($cName, $rName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a BC break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the sence of publshing this function?
maybe mark this is deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@turrsis maybe it was wrong as public
in first place, but we can't change it in 2.x
anyways
weierophinney
added a commit
that referenced
this pull request
Oct 23, 2013
…ractFactories(4285) ServiceManager - fix AbstractFactories performance and service waiting
weierophinney
added a commit
that referenced
this pull request
Oct 23, 2013
- Return from conditional - Promote else
weierophinney
added a commit
that referenced
this pull request
Oct 23, 2013
ghost
assigned weierophinney
Oct 23, 2013
weierophinney
added a commit
that referenced
this pull request
Nov 1, 2013
Add regression test for #5237
weierophinney
added a commit
to zendframework/zend-servicemanager
that referenced
this pull request
May 15, 2015
…ix/serviceManager-trollAbstractFactories(4285) ServiceManager - fix AbstractFactories performance and service waiting
weierophinney
added a commit
to zendframework/zend-servicemanager
that referenced
this pull request
May 15, 2015
- Return from conditional - Promote else
weierophinney
added a commit
to zendframework/zend-servicemanager
that referenced
this pull request
May 15, 2015
weierophinney
added a commit
to zendframework/zend-servicemanager
that referenced
this pull request
May 15, 2015
…si/test/abstract-factories Add regression test for zendframework/zendframework#5237
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When ServiceManager get service, it call canCreateFromAbstractFactory 3 times and check all abstract factories 3 times. And after this check all abstract factories for creating service. In total : 4 cycles for all abstract factories and 4 call abstractFactory::canCreateServiceWithName for each factory.
#4285 is litle wrong - see ServiceManagerTest::testWaitingAbstractFactory(). Second call of $this->serviceManager->has('SomethingThatCanBeCreated') was failed, but the service already exists.