Skip to content

Commit b3ee942

Browse files
committed
minor #8475 Deprecate auto picking the first provider (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #8475). Discussion ---------- Deprecate auto picking the first provider This fixes #8446. Commits ------- 4915e11 Deprecate auto picking the first provider
2 parents 92e9293 + 4915e11 commit b3ee942

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

security/multiple_user_providers.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,16 @@ a new provider that chains the two together:
8282
),
8383
));
8484
85-
Now, all firewalls without an explicitly configured user provider will use
86-
the ``chain_provider`` since it's the first specified. The ``chain_provider``
87-
will, in turn, try to load the user from both the ``in_memory`` and ``user_db``
88-
providers.
85+
Now, all firewalls that explicitly define ``chain_provider`` as their user
86+
provider will, in turn, try to load the user from both the ``in_memory`` and
87+
``user_db`` providers.
88+
89+
.. versionadded:: 3.4
90+
In previous Symfony versions, firewalls that didn't define their user provider
91+
explicitly, used the first existing provider (``chain_provider`` in this
92+
example). However, auto-selecting the first user provider has been deprecated
93+
in Symfony 3.4 and will throw an exception in 4.0. Always define the provider
94+
used by the firewall when there are multiple providers.
8995

9096
You can also configure the firewall or individual authentication mechanisms
9197
to use a specific provider. Again, unless a provider is specified explicitly,

0 commit comments

Comments
 (0)