Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DI] Remove useless state from ServiceLocator#22029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chalasr left a comment
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.
👍
5a8263e toe0a5eecCompare| } | ||
| if (true ===$factory =$this->factories[$id]) { | ||
| thrownewServiceCircularReferenceException($id,array($id,$id)); |
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.
Do we really need to cover this? The ServiceLocator is not passed to the factories so it is very unlikely to happen.
nicolas-grekasMar 16, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Why should we remove the safe guard? Symfony is used into the wild, it needs to handle properly any situations. I see no reason to trade a few lines vs a fatal error, however rare it is.
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.
Ok, just asking, fine for me as is then.
xabbuh commentedMar 17, 2017
👍 Status: Reviewed |
| } | ||
| publicfunctiontestGetDoesNotExecuteTheSameCallableTwice() | ||
| publicfunctiontestGetDoesNotMemoize() |
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.
Memoize => Memorize
nicolas-grekasMar 17, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Not a typo :)
https://en.wikipedia.org/wiki/Memoization
jakzal commentedMar 17, 2017
apart from the typo 👍 |
fabpot commentedMar 17, 2017
Thank you@nicolas-grekas. |
…rekas)This PR was merged into the 3.3-dev branch.Discussion----------[DI] Remove useless state from ServiceLocator| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no (master only)| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -One less state to manage for the engine, and allows to deal with non-shared services.Commits-------e0a5eec [DI] Remove useless state from ServiceLocator
One less state to manage for the engine, and allows to deal with non-shared services.