Skip to content

Commit b72a65e

Browse files
committed
Document the UserValueResolver
1 parent f83b88a commit b72a65e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

controller/argument_value_resolver.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,25 @@ Symfony ships with the following value resolvers in the
4545
argument list. When the action is called, the last (variadic) argument will
4646
contain all the values of this array.
4747

48-
In addition, some official bundles provide other value resolvers:
48+
In addition, some components and official bundles provide other value resolvers:
49+
50+
:class:`Symfony\\Component\\Security\\Http\\Controller\\UserValueResolver`
51+
Injects the object that represents the current logged in user if type-hinted
52+
with ``UserInterface``. Default value can be set to ``null`` in case
53+
the controller can be accessed by anonymous users. It requires installing
54+
the :doc:`Security component </components/security>`.
4955

5056
:class:`Symfony\\Bundle\\SecurityBundle\\SecurityUserValueResolver`
5157
Injects the object that represents the current logged in user if type-hinted
5258
with ``UserInterface``. Default value can be set to ``null`` in case
5359
the controller can be accessed by anonymous users. It requires installing
5460
the `SecurityBundle`_.
5561

62+
.. deprecated:: 4.1
63+
64+
The resolver was deprecated in Symfony 4.1 in favor of
65+
`Symfony\\Component\\Security\\Http\\Controller\\UserValueResolver`.
66+
5667
``Psr7ServerRequestResolver``
5768
Injects a `PSR-7`_ compliant version of the current request if type-hinted
5869
with ``RequestInterface``, ``MessageInterface`` or ``ServerRequestInterface``.

0 commit comments

Comments
 (0)