SIGN IN SIGN UP

[DependencyInjection] Name the package to install for a missing component extension

Both ways of reaching a missing extension reported it without saying what to install.
Writing "notifier:" at the root said there was no extension able to load it, and setting
"framework.notifier" said the "notifier" extension was not registered, where the section
used to answer with "Try running composer require symfony/notifier".

Rather than teach the DependencyInjection component about other components, a bundle
declares what it knows through the ".container.extension_packages" build parameter, a map
of configuration key to package name. FrameworkBundle fills it in build(), which runs
before any configuration file is loaded, and both error paths read it back.

Keys are declared, not derived from the name: guessing "symfony/acme-foo" for a key we know
nothing about would send the reader after a package that does not exist. "cache" and
"router" are left out on purpose, since symfony/cache and symfony/routing are hard
requirements of FrameworkBundle and their bundles are registered unconditionally, so
telling anyone to require them could never help.
N
Nicolas Grekas committed
953a7226a1c98eee54779de1dc9a4c0f46855f27
Parent: e640013