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] Allow mixed root onCompoundConstraintTestCase validator#61056

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

Conversation

@thePanz
Copy link
Contributor

@thePanzthePanz commentedJul 7, 2025
edited
Loading

QA
Branch?7.2
Bug fix?yes
New feature?no
Deprecations?no
Issues
LicenseMIT

The CompoundConstraintTestCase is currently defining aprotected string $root, forcing the root to be a "string".
Testing compound constraints where the root is something different is triggering Static-Analysis (phpstan) warings or (worst) casting the$root to a string, causing PHP errors.

In the given code: the$root is passed to the ExecutionContext, which has the following constructor signature:__construct(private ValidatorInterface $validator, private mixed $root, private TranslatorInterface $translator, ...), thusmixed can be safely used in theCompoundConstraintTestCase class too.

@carsonbot

This comment has been minimized.

@carsonbotcarsonbot changed the titleAllow mixed root on CompoundConstraintTestCase validator[Validator] Allow mixed root on CompoundConstraintTestCase validatorJul 7, 2025
@nicolas-grekasnicolas-grekas modified the milestones:7.3,7.2Jul 8, 2025
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.

For 7.2

@thePanzthePanzforce-pushed thecompound-constraint-test-mixed-root branch from8af9986 to47b5387CompareJuly 8, 2025 07:23
@thePanzthePanz changed the base branch from7.3 to7.2July 8, 2025 07:23
@thePanz
Copy link
ContributorAuthor

For 7.2

I rebased this PR on the 7.2 branch

@OskarStarkOskarStark changed the title[Validator] Allow mixed root on CompoundConstraintTestCase validator[Validator] Allow mixed root onCompoundConstraintTestCase validatorJul 8, 2025
@nicolas-grekas
Copy link
Member

Thank you@thePanz.

thePanz reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas merged commite88263c intosymfony:7.2Jul 9, 2025
11 checks passed
@thePanzthePanz deleted the compound-constraint-test-mixed-root branchJuly 9, 2025 10:08
This was referencedJul 31, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas 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.

5 participants

@thePanz@carsonbot@nicolas-grekas@alexandre-daubois@OskarStark

[8]ページ先頭

©2009-2025 Movatter.jp