-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] register alias after defining the class #21096
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
xabbuh
commented
Dec 29, 2016
Q | A |
---|---|
Branch? | master |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | |
License | MIT |
Doc PR |
renaming is hard :) |
Maybe we should add the process to the docs. :D |
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 not use my latest approach? 1e29773
In this way, the file that is getting deprecated will contain the class_alias
, and will be deleted altogether in next major, without touching the new class
Because 1e29773 doesn't work: the alias must be defined alongside the aliased class so that |
But @nicolas-grekas the change does work! See the build status in my PR #21088 from which I extracted the prev. commit. If you look at 41f995e I've added new assertion to the test to see that the |
It works because you already loaded everything. |
Thank you @xabbuh. |
…class (xabbuh) This PR was merged into the 3.3-dev branch. Discussion ---------- [DependencyInjection] register alias after defining the class | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- d8d4417 [DI] register alias after defining the class
@nicolas-grekas nope. As you can see, I've added your case too here: 78c8e08 |