Skip to content

[FrameworkBundle] Display aliases in debug:container command #54459

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

Closed
wants to merge 1 commit into from

Conversation

94noni
Copy link
Contributor

@94noni 94noni commented Apr 2, 2024

Q A
Branch? 7.1
Bug fix? no
New feature? yes
Deprecations? no
Issues Restart #47427
License MIT

Note

This PR restarts the work achieved by @jlslew in #47427
as per #47427 (comment)

I do think this PR can give some valueable data (like one of my prev PR)
so I am continuing the work already done, to push it forward :)

I may need help/guidance for understanding the tests logic of such descriptor, as they are quite complicated :s


@94noni 94noni force-pushed the framework-debug-container-alias branch from 48be857 to f3e7977 Compare April 2, 2024 17:32
'id' => (string) $value,
'alias' => $node->getValue()->getClass(),
];
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the "else"

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Apr 3, 2024

Arf, I'm sorry but looking at the implementation, this is a false promise. This doesn't show aliases but only the class of the source service. This works for services that use the id=fqcn convention, but that's inaccurate in the general case.

ContainerBuilderDebugDumpPass runs BEFORE_REMOVING which means ResolveReferencesToAliasesPass already ran and we lost the information that would be needed to achieve this.

I don't know if we can reorder the passes to dump before resolving, but as is, this PR doesn't make sense to me.

@stof
Copy link
Member

stof commented Apr 4, 2024

If we dump before resolving, we might end up missing other information in the debug commands by displaying the state before most compiler pass have run

@94noni
Copy link
Contributor Author

94noni commented Apr 4, 2024

@nicolas-grekas oki i got you, to be fair I've juste restarted it, blindly copy/pasting for now so the PR get visible
if, for actual code in container, its not possible lets close as wontfix
thx

@94noni 94noni closed this Apr 4, 2024
@94noni 94noni deleted the framework-debug-container-alias branch August 8, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants