-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DI] Fix AutowirePass fatal error with classes that have non-existing parents #18600
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
nicolas-grekas
commented
Apr 20, 2016
•
edited
Loading
edited
Q | A |
---|---|
Branch? | 2.8 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #18188 |
License | MIT |
Doc PR | - |
@nicolas-grekas You are a PHP hacker. Great! |
|
||
try { | ||
spl_autoload_register($throwingAutoloader); |
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 could even be outside the try/catch
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.
@nicolas-grekas Very clever trick!
|
@stof I wondered the same, but someone needs to give me a test case that would trigger the fatal error first :) |
@nicolas-grekas register an autowired service for a class which has a constructor argument typehinted with a class which extend a missing class |
f799b6c
to
202cc77
Compare
👍 |
1 similar comment
👍 |
... and one more bug fixed, thank you @nicolas-grekas. |
…on-existing parents (hason, nicolas-grekas) This PR was merged into the 2.8 branch. Discussion ---------- [DI] Fix AutowirePass fatal error with classes that have non-existing parents | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #18188 | License | MIT | Doc PR | - Commits ------- 202cc77 [DI] Fix AutowirePass fatal error with classes that have non-existing parents 1735b85 [DependencyInjection] Tests for AutowirePass with missing parent class