-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[9.x] Adds support for PHP's
BackedEnum
to be "rendered" on blade v…
…iews. (#44445) * Allows encode HTML special characters in a enum value * Apply fixes from StyleCI * Improves condition * Adds more tests * Updates tests for PHP 8.1 Co-authored-by: StyleCI Bot <[email protected]>
- Loading branch information
1 parent
89db9e5
commit fcdce7c
Showing
4 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Illuminate\Tests\Support\Fixtures; | ||
|
||
enum IntBackedEnum: int | ||
{ | ||
case ROLE_ADMIN = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Illuminate\Tests\Support\Fixtures; | ||
|
||
enum StringBackedEnum: string | ||
{ | ||
case ADMIN_LABEL = 'I am \'admin\''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters