Skip to content

Document the UserValueResolver #11468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion controller/argument_value_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,25 @@ Symfony ships with the following value resolvers in the
argument list. When the action is called, the last (variadic) argument will
contain all the values of this array.

In addition, some official bundles provide other value resolvers:
In addition, some components and official bundles provide other value resolvers:

:class:`Symfony\\Component\\Security\\Http\\Controller\\UserValueResolver`
Injects the object that represents the current logged in user if type-hinted
with ``UserInterface``. Default value can be set to ``null`` in case
the controller can be accessed by anonymous users. It requires installing
the :doc:`Security component </components/security>`.

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

.. deprecated:: 4.1

The resolver was deprecated in Symfony 4.1 in favor of
`Symfony\\Component\\Security\\Http\\Controller\\UserValueResolver`.

``Psr7ServerRequestResolver``
Injects a `PSR-7`_ compliant version of the current request if type-hinted
with ``RequestInterface``, ``MessageInterface`` or ``ServerRequestInterface``.
Expand Down