Skip to content

[11.x] Fix docblocks for code that calls enum_value()#54432

Merged
taylorotwell merged 3 commits intolaravel:11.xfrom
cosmastech:patch-5
Jan 31, 2025
Merged

[11.x] Fix docblocks for code that calls enum_value()#54432
taylorotwell merged 3 commits intolaravel:11.xfrom
cosmastech:patch-5

Conversation

@cosmastech
Copy link
Contributor

@cosmastech cosmastech commented Jan 31, 2025

Any place where we call enum_value(), we can actually accept a backed or unit enum. Because \BackedEnum extends \UnitEnum, it's not necessary to union the two types. For instance: @template TEnum of \UnitEnum|\BackedEnum is redundant and can be reduced to TEnum of \UnitEnum.

Also allows QueuedClosure and PendingChain to accept an enum for the connection. I can back this change out, as it is not strictly a docblock change.

@github-actions
Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@cosmastech cosmastech marked this pull request as ready for review January 31, 2025 12:33
@taylorotwell taylorotwell merged commit c85b3e5 into laravel:11.x Jan 31, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants