Description
I have been thinking about this for a while and I think the best way to have bundles added to the kernel etc when you install one from composer is to do this from the symfony console.
The main issue is that if it's done with a composer hook/script, it'll fire at random when you install an old bundle, or if you upgrade a bundle it will remove/install it if it's installed as a zip. Lots of issues.
On the other hand, a bundle:install command could take a package name, install it via composer, and once installed prompt you if it should be enabled for all envs or only dev/test, and prompt if it should register a config/routing/.. automatically. Similarly bundle:remove would clean up the config, routing and whatnot, instead of leaving users with all that dirty work to do.
The downside is it probably means having composer as a dependency of the command.