-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[ExpressionLanguage] Added expression language syntax validator #35849
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
[ExpressionLanguage] Added expression language syntax validator #35849
Conversation
119b381
to
623540b
Compare
ref #16323 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint()
?
7a7556d
to
42e6a4e
Compare
Friendly ping @Andrej-in-ua |
Sorry for the delay, a slight change in priorities at work :( |
1ea6e34
to
8c88fb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good, just some minor comments on my side.
Please also add a line in the CHANGELOG of the component.
src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
Outdated
Show resolved
Hide resolved
fb43a13
to
c7b1f6b
Compare
src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php
Outdated
Show resolved
Hide resolved
4e126ab
to
a5cd965
Compare
Thank you @Andrej-in-ua. |
Proposal implementation #35700
The current solution is a compromise between support complexity and cleanliness.
I tried different solutions to the issue. A beautiful solution was obtained only with full duplication of the parser code. That is unacceptable because parser complexity is quite high.
The main problem in this solution is that nodes instances are created which are then not used. I do not think that linter can be a bottleneck and will greatly affect performance. If this is corrected, the parser code becomes a bunch of if's.
JFI: I did not added parsing without variable names, because this breaks caching and potential location for vulnerabilities.