Description
Related to symfony/symfony-docs#19655
When you have some bundle configuration file in your app and the bundle is not installed/enabled, you see an error message like this:
There is no extension able to load the configuration for "security"
(in (...)/config/packages/security.yaml). Looked for namespace "security",
found "framework", "web_server", "maker", "doctrine_cache", "doctrine",
"doctrine_migrations", "twig", "...", "knp_paginator" in
(...)/config/packages/security.yaml (which is loaded in
resource "(...)/config/packages/security.yaml").
This is generated in:
and
Problem: this error message is probably not perfectly clear for all developers, mostly newcomers. See e.g. https://stackoverflow.com/questions/55279011/there-is-no-extension-able-to-load-the-configuration-for-security
Possible solution: if we agree on improving this error message, we could do the same we do in other parts of Symfony, such as:
symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Lines 2131 to 2133 in 9ba818e
and:
We could remind developers to install the related bundle of a missing extension. Just hardcoding a few of the popular first-party/second-party bundles (security, twig, doctrine, etc.) would be enough.
Thanks!