Skip to content

Commit 58c1978

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Add the versionadded directive Add information about DateTimeValueResolver
2 parents e2bd729 + ac2b994 commit 58c1978

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

controller/argument_value_resolver.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,19 @@ Symfony ships with the following value resolvers in the
8585
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver`
8686
Attempts to find a request attribute that matches the name of the argument.
8787

88+
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DateTimeValueResolver`
89+
Attempts to find a request attribute that matches the name of the argument
90+
and injects a ``DateTimeInterface`` object if type-hinted with a class
91+
extending ``DateTimeInterface``.
92+
93+
By default any input that can be parsed as a date string by PHP is accepted.
94+
You can restrict how the input can be formatted with the
95+
:class:`Symfony\\Component\\HttpKernel\\Attribute\\MapDateTime` attribute.
96+
97+
.. versionadded:: 6.1
98+
99+
The ``DateTimeValueResolver`` was introduced in Symfony 6.1.
100+
88101
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver`
89102
Injects the current ``Request`` if type-hinted with ``Request`` or a class
90103
extending ``Request``.

0 commit comments

Comments
 (0)