Skip to content

Commit 18d41cc

Browse files
committed
minor #16351 [Form] Use a backed string enum in the EnumType example (Einenlum)
This PR was merged into the 5.4 branch. Discussion ---------- [Form] Use a backed string enum in the EnumType example A backed enum must declare the type of backed enum. Not declaring it is not valid. See [PHP documentation](https://www.php.net/manual/en/language.enumerations.backed.php). This PR is based on 5.4 since the EnumType appeared in this version. Commits ------- 132e0b9 Use a backed string enum in the EnumType example
2 parents d35d519 + 132e0b9 commit 18d41cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/forms/types/enum.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ short) defined somewhere in your application. This enum has to be of type
3636
// src/Config/TextAlign.php
3737
namespace App\Config;
3838

39-
enum TextAlign
39+
enum TextAlign: string
4040
{
4141
case Left = 'Left/Start aligned';
4242
case Center = 'Center/Middle aligned';

0 commit comments

Comments
 (0)