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] Pass context to expressions used inWhen constraints#58512

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:7.2fromKoNekoD:when-constraint-improve
Oct 10, 2024

Conversation

@KoNekoD
Copy link
Contributor

@KoNekoDKoNekoD commentedOct 9, 2024
edited
Loading

QA
Branch?7.2
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#58511
LicenseMIT

I encountered a problem with validation of nested entities and I needed to validate by parent field, if draft true then no validation is needed

vtsykun reacted with thumbs up emojivtsykun reacted with hooray emoji
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.2" but it seems your PR description refers to branch "7.2 for features / 5.4, 6.4, and 7.1 for bug fixes".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@carsonbotcarsonbot changed the titlefeat(when constraint): pass context and root[Validator] feat(when constraint): pass context and rootOct 9, 2024
@KoNekoD
Copy link
ContributorAuthor

@xabbuh Looks like it passed the tests(+-). What do you think of this feature?

@nicolas-grekasnicolas-grekas changed the title[Validator] feat(when constraint): pass context and root[Validator] Pass context to expressions used in When contraintsOct 9, 2024
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Works for me (ExpressionValidator already has this)
Can you please add a line in the CHANGELOG of the component and a test case?

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Can you please rebase to get rid of the merge commit?

@KoNekoD
Copy link
ContributorAuthor

KoNekoD commentedOct 9, 2024
edited
Loading

@nicolas-grekas rebased.

I'm having trouble setting up the tests. CI is too long to do it quickly. Is there any way to set up vendors locally? I'm currently getting an error when installing from a docker container

It is very frustrating that there is no Dockerfile and docker-compose to download dependencies or somehow resolve for it

@KoNekoDKoNekoDforce-pushed thewhen-constraint-improve branch from4b1eedf tofc9d69bCompareOctober 9, 2024 15:10
@alexandre-daubois
Copy link
Member

alexandre-daubois commentedOct 9, 2024
edited
Loading

You can have a local PHP installation (not in Docker) withapt-get orbrew depending on your OS. Then run acomposer update at the root of the project. Finally, use./phpunit path/to/your/Test.php to run it locally.

@KoNekoD
Copy link
ContributorAuthor

@nicolas-grekas done

@OskarStarkOskarStark changed the title[Validator] Pass context to expressions used in When contraints[Validator] Pass context to expressions used inWhen constraintsOct 9, 2024
@fabpotfabpotforce-pushed thewhen-constraint-improve branch from4637bf0 tof05ce63CompareOctober 10, 2024 05:26
@fabpot
Copy link
Member

Thank you@KoNekoD.

KoNekoD reacted with heart emoji

@fabpotfabpot merged commit6e9c993 intosymfony:7.2Oct 10, 2024
6 of 10 checks passed
@fabpotfabpot mentioned this pull requestOct 27, 2024
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

@OskarStarkOskarStarkOskarStark approved these changes

@alexandre-dauboisalexandre-dauboisalexandre-daubois approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

7.2

Development

Successfully merging this pull request may close these issues.

When constraint- Pass context and root to the list of available variables for expression language

7 participants

@KoNekoD@carsonbot@alexandre-daubois@fabpot@nicolas-grekas@OskarStark@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp