Skip to content

Introduce testNotListedValueInEnumArray#11795

Closed
maximecolin wants to merge 1 commit intodoctrine:3.3.xfrom
maximecolin:enum-array-error-test
Closed

Introduce testNotListedValueInEnumArray#11795
maximecolin wants to merge 1 commit intodoctrine:3.3.xfrom
maximecolin:enum-array-error-test

Conversation

@maximecolin
Copy link
Copy Markdown
Contributor

@maximecolin maximecolin commented Jan 21, 2025

Add a test that failed to highlight the error described in #11796

Using a json column with enumType, if the database contains a value that is not in enum, so an exception is thrown AbstractHydrator::buildEnum then converted to another exception in SimpleObjectHydrator. During this conversion, the original value is casted into string. In case of array of enum (json or simple array), $originalValue contains an array of string that can not be casted to string. So we got the "Array to string conversion" error instead of a proper error about a case not listed in the enum.

@github-actions
Copy link
Copy Markdown
Contributor

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Apr 22, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This pull request was closed due to inactivity.

@github-actions github-actions bot closed this Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant