Description
Symfony version(s) affected: 4.4.0
Description
We had the following security configuration in sulu for our test environment e.g.:
- https://github.com/sulu/skeleton/blob/2.0.2/config/packages/security_admin.yaml
- https://github.com/sulu/skeleton/blob/2.0.2/config/packages/test/security_admin.yaml
I currently fixed it by adding now set a default provider to the firewall setting:
security:
# ...
firewalls:
admin:
# ...
anonymous: ~
+ provider: sulu
# ...
Strangely I couldn't find this configuraiton in https://symfony.com/doc/current/reference/configuration/security.html#firewalls I just saw it that the SecurityExtension is accessing it here
How to reproduce
After upgrading a Project to Symfony 4.4 the following error does happens:
Not configuring explicitly the provider for the "anonymous" listener on "admin" firewall is ambiguous as there is more than one registered provider.
Possible Solution
None.
I couldn't see why this did work with 4.3. 🤔 couldn't see any changes in the SecurityExtension which could make problems.
Additional context
Happens only if providing multiple user providers but don't have a single provider defined ad firewell level not on form_login or json_login level.