Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[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

Merged
merged 1 commit into from
May 5, 2020

Conversation

Andrej-in-ua
Copy link
Contributor

@Andrej-in-ua Andrej-in-ua commented Feb 24, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets #35700
License MIT
Doc PR N/A

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.

@Koc
Copy link
Contributor

Koc commented Feb 24, 2020

ref #16323

@nicolas-grekas nicolas-grekas added this to the next milestone Feb 26, 2020
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lint()?

src/Symfony/Component/ExpressionLanguage/Parser.php Outdated Show resolved Hide resolved
@Andrej-in-ua Andrej-in-ua force-pushed the expression-language-validator branch 2 times, most recently from 7a7556d to 42e6a4e Compare February 28, 2020 13:55
@Andrej-in-ua Andrej-in-ua marked this pull request as ready for review February 28, 2020 15:01
@nicolas-grekas
Copy link
Member

Friendly ping @Andrej-in-ua

@Andrej-in-ua
Copy link
Contributor Author

Sorry for the delay, a slight change in priorities at work :(
Tomorrow or the day after tomorrow I will push changes.
Thanks!

@Andrej-in-ua Andrej-in-ua force-pushed the expression-language-validator branch from 1ea6e34 to 8c88fb3 Compare April 1, 2020 15:18
Copy link
Member

@nicolas-grekas nicolas-grekas left a 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/composer.json Outdated Show resolved Hide resolved
src/Symfony/Component/Validator/composer.json Outdated Show resolved Hide resolved
src/Symfony/Component/ExpressionLanguage/Parser.php Outdated Show resolved Hide resolved
src/Symfony/Component/ExpressionLanguage/Parser.php Outdated Show resolved Hide resolved
src/Symfony/Component/ExpressionLanguage/Parser.php Outdated Show resolved Hide resolved
@Andrej-in-ua Andrej-in-ua force-pushed the expression-language-validator branch from fb43a13 to c7b1f6b Compare April 22, 2020 10:50
@fabpot fabpot force-pushed the expression-language-validator branch from 4e126ab to a5cd965 Compare May 5, 2020 05:59
@fabpot
Copy link
Member

fabpot commented May 5, 2020

Thank you @Andrej-in-ua.

@fabpot fabpot merged commit 3d30ff7 into symfony:master May 5, 2020
@Andrej-in-ua Andrej-in-ua deleted the expression-language-validator branch May 5, 2020 13:19
@fabpot fabpot mentioned this pull request May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.