Skip to content
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

feat(when constraint): add context variable #20314

Open
wants to merge 1 commit into
base: 7.2
Choose a base branch
from
Open

Conversation

KoNekoD
Copy link

@KoNekoD KoNekoD commented Oct 10, 2024

Issue: #20312

@KoNekoD KoNekoD requested a review from xabbuh as a code owner October 10, 2024 08:01
@carsonbot carsonbot added this to the 7.2 milestone Oct 10, 2024
Comment on lines +166 to 167
Depending on how you use the constraint, you have access to 1 or 3 variables
in your expression:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Depending on how you use the constraint, you have access to 1 or 3 variables
in your expression:
Depending on how you use the constraint, you have access to different variables
in your expression:

To match with text in doc for Expression constraint, "to 1 or 3 variables" doesn't feel clear to me

Copy link
Contributor

Choose a reason for hiding this comment

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

What about « multiple internal variables »

Comment on lines +174 to +175
``context``
This is the context that is used in validation
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a versionadded directive for this new variable ?

Copy link
Member

Choose a reason for hiding this comment

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

We need to improve this description. Right now it's basically saying "context is the validation context" 😐

For example, in the Validation article (https://symfony.com/doc/current/validation.html) the word context is not even mentioned once. So, what's the "validation context"? Any article that we could link from here so readers can learn more? Thanks!

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