Skip to content

Fix for potential bug with non-backed enums - #43842

Merged
taylorotwell merged 6 commits into
laravel:9.xfrom
ollieread:non-backed-enum-fix
Aug 24, 2022
Merged

taylorotwell merged 6 commits into
laravel:9.xfrom
ollieread:non-backed-enum-fix

Conversation

@ollieread

Copy link
Copy Markdown
Contributor

This PR abstracts out the collection of an enum case and enum value to their own methods to simplify and fixes a potential bug with addCastAttributesToArray where it always assumes a backed enum.

It also fixes something left over from the last PR, where relation dictionaries didn't support non-backed enums.

@taylorotwell
taylorotwell merged commit f28d762 into laravel:9.x Aug 24, 2022
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