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 synthetic services from methodMap + generated methods#21244
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
| /** | ||
| * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException | ||
| * @expectedExceptionMessage You have requested asynthetic service("request"). The DIC does not know how to construct this service. | ||
| * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException |
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.
We go from\RuntimeException to\InvalidArgumentException now.. minor BC break :)
👍 for master, as it's needed to keep things simple.
stof commentedJan 12, 2017
The generated method (and it existence in the method map) has another purpose: it allows |
nicolas-grekas commentedJan 12, 2017
@stof, yes, and my point is that we don't care, because these are erroneous situations anyway. The fact the current behavior prevents meaningful progress largely wins over the small&rare DX+ that it provides. |
fabpot commentedJan 12, 2017
👍 |
nicolas-grekas commentedJan 13, 2017
ro0NL commentedJan 13, 2017
It makes sense right? Ie. we donthave Imo. the exception is even better now, service not found. |
ro0NL commentedJan 14, 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.
What if an alias refers a pre-defined service? I think |
3775ba8 toc1e1e99Comparenicolas-grekas commentedJan 15, 2017
@ro0NL updated, was that what you meant? |
ro0NL commentedJan 15, 2017
Yep 👍 |
lyrixx commentedJan 15, 2017
👍 |
fabpot commentedJan 15, 2017
Thank you@nicolas-grekas. |
…ted methods (nicolas-grekas)This PR was merged into the 3.3-dev branch.Discussion----------[DI] Remove synthetic services from methodMap + generated methods| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -For synthetic services, the generated methods are just dead code to fill opcache ;)And having them in "methodMap" prevents using the property for checking if a service comes from a (non-synthetic) definition or not.This prepares some changes that we'd like to do in 4.0, see#19668.Commits-------c1e1e99 [DI] Remove synthetic services from methodMap + generated methods
Uh oh!
There was an error while loading.Please reload this page.
For synthetic services, the generated methods are just dead code to fill opcache ;)
And having them in "methodMap" prevents using the property for checking if a service comes from a (non-synthetic) definition or not.
This prepares some changes that we'd like to do in 4.0, see#19668.