Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

[Validator] Add option to pass custom values to Expression validator#25504

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromostrolucky:expression-values
Jan 8, 2018

Conversation

@ostrolucky
Copy link
Contributor

@ostroluckyostrolucky commentedDec 15, 2017
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

I needed this in a Form. I had no way to pass things from$options into Expression validator.

Maybe can aid in#23134

ro0NL reacted with thumbs up emoji

public$message ='This value is not valid.';
public$expression;
public$values =array();

Choose a reason for hiding this comment

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

should it be named $variables?

Copy link
ContributorAuthor

@ostroluckyostroluckyDec 18, 2017
edited
Loading

Choose a reason for hiding this comment

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

I've named it according to second argument in ExpressionLanguage::evaluate. If $variables is better name, maybe it's worth it to change it there too? What do you guys think?

@nicolas-grekasnicolas-grekas added this to the4.1 milestoneDec 18, 2017
@ostroluckyostroluckyforce-pushed theexpression-values branch 2 times, most recently from1b489fc to57d79b2CompareDecember 30, 2017 16:00
@ostrolucky
Copy link
ContributorAuthor

ostrolucky commentedJan 4, 2018
edited
Loading

Ping. Values or variables? Will change in ExpressionLanguage accordingly.

Vote by reacting with:
👍 variables
👎 values

@nicolas-grekas
Copy link
Member

I'm good with values also. Any other opinion?
(rebase needed)

@ostrolucky
Copy link
ContributorAuthor

Rebased.

More options for naming :

  1. context - used by Twig, hoa/ruler
  2. parameters - used by ControllerTrait::render
  3. environment - used in various places, most notably in Psr/LoggerInterface

Vote by reacting with:

👍: variables
👎: values
😆 : context
🎉 : parameters
❤️ : environment

yceruto reacted with thumbs up emojimateuszsip, GwendolenLynch, egircys, kunicmarko20, jvasseur, and javiereguiluz reacted with thumbs down emoji

@fabpot
Copy link
Member

Thank you@ostrolucky.

@fabpotfabpot merged commitba0565e intosymfony:masterJan 8, 2018
fabpot added a commit that referenced this pull requestJan 8, 2018
…sion validator (ostrolucky)This PR was merged into the 4.1-dev branch.Discussion----------[Validator] Add option to pass custom values to Expression validator| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -I needed this in a Form. I had no way to pass things from `$options` into Expression validator.Maybe can aid in#23134Commits-------ba0565e [Validator] Add option to pass custom values to Expression validator
@fabpotfabpot mentioned this pull requestMay 7, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

4 participants

@ostrolucky@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp