Skip to content

Commit 3fdf670

Browse files
author
Mathieu
committed
[HttpKernel] Add #[ValueResolver] for specifying a controller argument resolver
1 parent a2da566 commit 3fdf670

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

controller/value_resolver.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,17 @@ Symfony ships with the following value resolvers in the
146146
argument list. When the action is called, the last (variadic) argument will
147147
contain all the values of this array.
148148

149+
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\SpecifiedResolverValueResolver`
150+
This resolver will ensure every argument bearing the ``ValueResolver`` attribute
151+
will have its value provided by the resolver whose name is passed to the attribute.
152+
153+
This way, you don't have to worry about resolvers' priority and you speed up your
154+
application a little because only one is called.
155+
156+
.. versionadded:: 6.3
157+
158+
The ``SpecifiedResolverValueResolver`` was introduced in Symfony 6.3.
159+
149160
In addition, some components, bridges and official bundles provide other value resolvers:
150161

151162
:class:`Symfony\\Component\\Security\\Http\\Controller\\UserValueResolver`

0 commit comments

Comments
 (0)