-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Add debug autoconfigure to the container debug command #26745
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
@@ -121,6 +126,9 @@ protected function execute(InputInterface $input, OutputInterface $output) | |||
$options = array(); | |||
} elseif ($parameter = $input->getOption('parameter')) { | |||
$options = array('parameter' => $parameter); | |||
} elseif ($input->getOption('autoconfigure')) { | |||
@unlink($this->getApplication()->getKernel()->getContainer()->getParameter('debug.container.dump')); |
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.
The container dump doesn't contain the information concerning autoconfiguring tags. is it problematic? Is there another way? Should I pass an argument to getContainerBuilder
to force a compilation ?
Wouldn't it make more sense to show the full template of the autoconfigure? Autoconfigure works based on an interface(/class?), thus it would make sense to see what other configuration is being added by this. |
Sorry, I don't understand. What is the the full template of the autoconfigure ? Do you propose to display like this:
or do you propose to display like the output of the command
|
What about something like this?
|
The command would have been useful to me during a migration of a project to the autowiring/autoconfigure. Every time, I wondered if I could delete the configuration or not in services.yaml to reduce its size. The command allows to know the autonconfiguring tags. If there is a need to know the full template, the command |
I really think such a command is a nice addition. Maybe a separate command could be worth it? |
rebase needed (needs to account for the new show-hidden option) |
@nicolas-grekas I create the separate command in #28730 |
Closing in favor of #28730 |
This PR try to list the tags that are applied on certain classes through autoconfiguration