Skip to content

[FrameworkBundle] Add validator.expression_language service #39327

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
Dec 8, 2020
Merged

[FrameworkBundle] Add validator.expression_language service #39327

merged 1 commit into from
Dec 8, 2020

Conversation

fbourigault
Copy link
Contributor

@fbourigault fbourigault commented Dec 5, 2020

Q A
Branch? 5.x
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR

This add a validator.expression_language service to allow better than in-memory caching of validation expression.

This also opens possibilities to extend the expression language available in validation expression through the use of ExpressionFunctionProviderInterface and a compiler pass.

I tried to do something close as what exists for security.expression_language service but I still have some questions.

  • Which kind of tests should I write for this feature?
  • Does it deserve having it's own child ExpressionLanguage class?

#SymfonyHackday

@carsonbot
Copy link

Hey!

I like what you have done here.

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@fbourigault fbourigault marked this pull request as ready for review December 5, 2020 13:50
@derrabus derrabus changed the title Add validator.expression_language service #SymfonyHackday Add validator.expression_language service Dec 5, 2020
@carsonbot carsonbot changed the title Add validator.expression_language service [FrameworkBundle] Add validator.expression_language service Dec 5, 2020
@derrabus derrabus added this to the 5.x milestone Dec 5, 2020
@derrabus
Copy link
Member

derrabus commented Dec 5, 2020

I think this could even be considered as a bugfix.

@fbourigault
Copy link
Contributor Author

Should I rebase on 4.4?

@fabpot
Copy link
Member

fabpot commented Dec 8, 2020

@fbourigault I don't think so, it looks like a new feature to me. We (or perhaps this is just me really) try to be much more conservative in merging non bugs in older branches. And reading the description/code, it does not looks like a bug to me.

@fabpot
Copy link
Member

fabpot commented Dec 8, 2020

Thank you @fbourigault.

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