Skip to content

Commit d0f8f88

Browse files
authored
[Security] anonymous: lazy deprecation warning
After upgrade to symfony/security-bundle to 5.1 and I got the deprecation warning Since symfony/security-bundle 5.1: Using "anonymous: lazy" to make the firewall lazy is deprecated, use "anonymous: true" and "lazy: true" instead.
1 parent d3c37f0 commit d0f8f88

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

security.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ You can manually encode a password by running:
231231
3a) Authentication & Firewalls
232232
------------------------------
233233

234+
.. versionadded:: 5.1
235+
236+
The ``lazy: true`` option was introduced in Symfony 5.1. Prior to version 5.1,
237+
it was enabled using ``anonymous: lazy``
238+
234239
The security system is configured in ``config/packages/security.yaml``. The *most*
235240
important section is ``firewalls``:
236241

@@ -245,7 +250,8 @@ important section is ``firewalls``:
245250
pattern: ^/(_(profiler|wdt)|css|images|js)/
246251
security: false
247252
main:
248-
anonymous: lazy
253+
anonymous: true
254+
lazy: true
249255
250256
.. code-block:: xml
251257

0 commit comments

Comments
 (0)