Skip to content

Commit a24d2d4

Browse files
committed
minor #17157 Update argument_value_resolver.rst (Jay-Way)
This PR was merged into the 6.1 branch. Discussion ---------- 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. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 770df12 Update argument_value_resolver.rst
2 parents 1cb34ca + 770df12 commit a24d2d4

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)