Skip to content

Commit 770df12

Browse files
authored
Update argument_value_resolver.rst
Fix documentation for Built-In Value Resolvers The code in the current documentation produces an error when implemented like described. The fix is to not include the FQN of the Enum class, because an instance of BackedEnum is expected.
1 parent 1cb34ca commit 770df12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/argument_value_resolver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Symfony ships with the following value resolvers in the
6565
// this allows all values defined in the Enum
6666
'suit' => new EnumRequirement(Suit::class),
6767
// this restricts the possible values to the Enum values listed here
68-
'suit' => new EnumRequirement([Suit::class, Suit::Diamonds, Suit::Spades]),
68+
'suit' => new EnumRequirement([Suit::Diamonds, Suit::Spades]),
6969
])]
7070
public function list(Suit $suit): Response
7171
{

0 commit comments

Comments
 (0)