Skip to content

Commit f5d2a66

Browse files
committed
Remove invalid tip for multiple providers
As confirmed by stof in symfony#9734, the tip has never worked and is not going to work
1 parent ea8db68 commit f5d2a66

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

book/security.rst

-49
Original file line numberDiff line numberDiff line change
@@ -1469,55 +1469,6 @@ Now, all authentication mechanisms will use the ``chain_provider``, since
14691469
it's the first specified. The ``chain_provider`` will, in turn, try to load
14701470
the user from both the ``in_memory`` and ``user_db`` providers.
14711471

1472-
.. tip::
1473-
1474-
If you have no reasons to separate your ``in_memory`` users from your
1475-
``user_db`` users, you can accomplish this even more easily by combining
1476-
the two sources into a single provider:
1477-
1478-
.. configuration-block::
1479-
1480-
.. code-block:: yaml
1481-
1482-
# app/config/security.yml
1483-
security:
1484-
providers:
1485-
main_provider:
1486-
memory:
1487-
users:
1488-
foo: { password: test }
1489-
entity:
1490-
class: Acme\UserBundle\Entity\User,
1491-
property: username
1492-
1493-
.. code-block:: xml
1494-
1495-
<!-- app/config/security.xml -->
1496-
<config>
1497-
<provider name=="main_provider">
1498-
<memory>
1499-
<user name="foo" password="test" />
1500-
</memory>
1501-
<entity class="Acme\UserBundle\Entity\User" property="username" />
1502-
</provider>
1503-
</config>
1504-
1505-
.. code-block:: php
1506-
1507-
// app/config/security.php
1508-
$container->loadFromExtension('security', array(
1509-
'providers' => array(
1510-
'main_provider' => array(
1511-
'memory' => array(
1512-
'users' => array(
1513-
'foo' => array('password' => 'test'),
1514-
),
1515-
),
1516-
'entity' => array('class' => 'Acme\UserBundle\Entity\User', 'property' => 'username'),
1517-
),
1518-
),
1519-
));
1520-
15211472
You can also configure the firewall or individual authentication mechanisms
15221473
to use a specific provider. Again, unless a provider is specified explicitly,
15231474
the first provider is always used:

0 commit comments

Comments
 (0)