From 770df1204d283589d632a020873d3f0b922ebe46 Mon Sep 17 00:00:00 2001 From: Jay-Way Date: Thu, 11 Aug 2022 15:35:37 +0200 Subject: [PATCH] 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. --- controller/argument_value_resolver.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/argument_value_resolver.rst b/controller/argument_value_resolver.rst index 3eae1924e05..2f45e7905aa 100644 --- a/controller/argument_value_resolver.rst +++ b/controller/argument_value_resolver.rst @@ -65,7 +65,7 @@ Symfony ships with the following value resolvers in the // this allows all values defined in the Enum 'suit' => new EnumRequirement(Suit::class), // this restricts the possible values to the Enum values listed here - 'suit' => new EnumRequirement([Suit::class, Suit::Diamonds, Suit::Spades]), + 'suit' => new EnumRequirement([Suit::Diamonds, Suit::Spades]), ])] public function list(Suit $suit): Response {