[Security][DX] Deprecate/warn having the security bundle loaded, but not having any config #47593
Labels
Bug
DX
DX = Developer eXperience (anything that improves the experience of using Symfony)
SecurityBundle
Status: Reviewed
Symfony version(s) affected
5.4.11
Description
Currently, if you don't have any security config, the Security bundle skips loading any of its conifg:
symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Lines 90 to 92 in 308edb5
This can lead to weird errors like:
The developer is left to debug why Twig bundle is not being loaded, why the Security bundle is not loaded (they both are) (I'd argue that this itself is a bug).
How to reproduce
Possible Solution
Additional Context
This happens if you're setting up a tiny Symfony app for functional tests where you need the smallest working config, you might omit things you're not directly interested in, but that can have unintended consequences which are hard to debug.
The text was updated successfully, but these errors were encountered: