Skip to content

Commit 12f72b6

Browse files
committed
[HttpKernel] Add a controller argument resolver for backed enums
1 parent 2b03cdc commit 12f72b6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controller/argument_value_resolver.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Built-In Value Resolvers
2020
Symfony ships with the following value resolvers in the
2121
:doc:`HttpKernel component </components/http_kernel>`:
2222

23+
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\BackedEnumValueResolver`
24+
Attempts to resolve a backed enum case from a route path parameter that matches the name of the argument.
25+
Leads to a 404 Not Found response if the value isn't a valid backing value for the enum type.
26+
2327
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver`
2428
Attempts to find a request attribute that matches the name of the argument.
2529

0 commit comments

Comments
 (0)