Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Deprecate auto-injection of the container in AbstractController instances#27462
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
curry684 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.
Fair solution for the main underlying confusing issue.
| } | ||
| privatefunctionconfigureController($controller) | ||
| privatefunctionconfigureController($controller,$class) |
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.
string $class ?
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.
updated
| $controller->setContainer($previousContainer); | ||
| if ($controllerinstanceof AbstractController) { | ||
| $previousContainer =$controller->setContainer($this->container); | ||
| if (null !==$previousContainer) { |
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 test can maybe be invertedif (null === $previousContainer) else for clarity?
e90e920 to38277b7Compare…ctController instances
38277b7 toe2f344fCompare…ainer in AbstractController instances (nicolas-grekas)This PR was merged into the 4.2-dev branch.Discussion----------[FrameworkBundle] Deprecate auto-injection of the container in AbstractController instances| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Should enhance DX by preventing situations like#27436.Commits-------e2f344f [FrameworkBundle] Deprecate auto-injection of the container in AbstractController instances
Should enhance DX by preventing situations like#27436.