Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DoctrineBridge] Fix invalid guess with enumType#45012
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jonag commentedJan 13, 2022
I was playing with the last version of Doctrine this afternoon and ran into this exact issue. This also prevent the Serializer to correctly denormalize an object which one of its property is an enum. I was looking for a way to fix this but you were faster. Anyway, I tried your patch and it works like a charm, thank you 👌 ! |
nicolas-grekas commentedJan 14, 2022
Thank you@jderusse. |
derrabus commentedJan 14, 2022
Thank you! 🙂 |
Sincedoctrine/orm#9304 doctrine allows Enums with the new
enumTypeoption.ie.
The issue is, it break validations at several places:
doctrinerExtractorguess it's astring(Because oftype = string), and validation adds the constraintAssert\Type(string)doctrineLoaderguess it's a string with a maxLength and validation adds a constrainAssert\Length(max=1)