[FrameworkBundle] debug:autowiring: Fix wrong display when using class_alias #36519
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Imagine that
FooInterface
is an alias, but it is deprecated and so has aclass_alias
toBarInterface
. Currently,debug:autowiring
will actually print that's the autowiring alias isBarInterface
, despite there being no such id in the container.@nicolas-grekas originally (on purpose) made the 2nd argument to
Descriptor::getClassDescription()
be passed by reference for this exact feature - 56aab09 - but I can't figure out why. This change (which effectively removes the by-reference modifying) made no existing tests fail.Discovered this because the whole deprecated
Doctrine\Common\Persistence\ManagerRegistry
vs newerDoctrine\Persistence\ManagerRegistry
causes the issue.Thanks!