-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
Formatting bug for Symfony Constraints #3645
Comments
That's correct. The code needs to be complete. Include it to the analysed code: function mail() {} |
Getting |
Could you share the link to that demo? |
I can't. It's still /demo when I press Process. Form is filled as in the picture above. |
I see... New I remember! The @Email annotation is using If we'd allow Just use different "safe" annotation: https://getrector.org/demo/2d619dcb-71bd-48ed-a212-8d644df3614f#result |
As for annotation formatting, there is often nothing we can do, as there is no tool to preserve format. If the behavior doesn't change, we close it as won't fix. |
Actually NotNull cannot be used as $email should be also validated with @Email. I wonder why rector even touches this line (especially with this configuration). |
It can. It's not relevant for this example. It is basically "any annotation class".
The solution is to correct formatting in whole project, e.g. with some regex. Anything else will disable Rector rules. |
Related to and duplicate of #4334 |
rectorphp/rector-src@92ff716 Improve string support in Doctrine Annotations (#3645)
Bug Report
Expected Behaviour
Rector should not touch it.
SF 4.4 application. My rector.yaml:
Can't run demo, getting
Function 'mail()' is not allowed.
.The text was updated successfully, but these errors were encountered: