Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce testNotListedValueInEnumArray #11795

Open
wants to merge 1 commit into
base: 3.3.x
Choose a base branch
from

Conversation

maximecolin
Copy link

@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.

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.

1 participant