From b72a65e0333afb5bc2d2b188e286f6103a505858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berislav=20Balogovi=C4=87?= Date: Tue, 23 Apr 2019 02:04:22 +0200 Subject: [PATCH] Document the UserValueResolver --- controller/argument_value_resolver.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/controller/argument_value_resolver.rst b/controller/argument_value_resolver.rst index c163d8abb3c..b3a31d20625 100644 --- a/controller/argument_value_resolver.rst +++ b/controller/argument_value_resolver.rst @@ -45,7 +45,13 @@ 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 `. :class:`Symfony\\Bundle\\SecurityBundle\\SecurityUserValueResolver` Injects the object that represents the current logged in user if type-hinted @@ -53,6 +59,11 @@ In addition, some official bundles provide other value resolvers: 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``.