-
Notifications
You must be signed in to change notification settings - Fork 110
Improve EntityColumnRule for enums #678
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
Conversation
ec67d0c
to
a66bd70
Compare
a66bd70
to
675692d
Compare
Thank you! |
Now started triggering:
Possibly because native enum is used in the database? |
Yeah, should be fixed. Please keep the previous version until then. |
These are probably related:
Here the database field is an actual string. |
Yes indeed. I wont be able to make a fix before tuesday or wednesday but I think the fix is easy if you wanna try @whataboutpereira The new code should be in a "elseif" after the if "enumTypeString !== null" (And Im surprised there wasnt test for your situation) |
The database field is a string yes but I think for some driver Doctrine add an extra checks on those string values, for instance Mysql. Also if you have listed values in your type, it's not a bad thing to ensure you are not accepting every possible string but only the listed values (or you're loosing the benefit of the enum type.
|
It seems this is a non-issue. Adding |
Funnily if I go back to 2.0.4 with these added |
Of course, the type wasnt precise enough before ; that was the purpose of the Pr But it introduced a regression we need to fix first so you can eithrr
And wait for 2.0.6 and use the var tag. |
I was contemplating just that. Looked at the rule code as well, but unsure how to fix it. :) Thanks! |
You can try #681 @whataboutpereira |
Thanks! Works as intended now. :) |
Closes #677