Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #25593 [Console] Simplify parameters in DI (Tobion)
This PR was merged into the 4.0 branch. Discussion ---------- [Console] Simplify parameters in DI | Q | A | ------------- | --- | Branch? | 4.0 | Bug fix? | no | New feature? |no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Currently the container gets filled with alot of ugly params like ``` 'console.command.ids' => array( 'console.command.symfony_bundle_frameworkbundle_command_aboutcommand' => 'console.command.about', 'console.command.symfony_bundle_frameworkbundle_command_assetsinstallcommand' => 'console.command.assets_install', 'console.command.symfony_bundle_frameworkbundle_command_cacheclearcommand' => 'console.command.cache_clear', ... ), 'console.lazy_command.ids' => array( 'console.command.about' => true, 'console.command.assets_install' => true, 'console.command.cache_clear' => true, ... ``` We can get rid of these in 4.0 with a little refactoring. - SF 4.0 does not include the auto-registration of commands anymore which was the reason why the `console.command.ids` used the class name as index to prevent commands already defined as service to not triggger auto-registration. -> The param does not need the index lookup anymore in 4.0 - What I now also changed is that this param only contains the command IDs of services that are NOT lazy loaded. This way, we don't need `console.lazy_command.ids` at all. This is a simplification of #24073 and still ensures framework bundle console application is compatible with console component 3.x and 4.x Commits ------- ae47805 [Console] Simplify parameters in DI
- Loading branch information