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 missing$extensions and$extensionsMessage to theImage constraint#60478

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
nicolas-grekas merged 1 commit intosymfony:6.4fromxabbuh:pr-47710
May 20, 2025

Conversation

xabbuh
Copy link
Member

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix1613e55#commitcomment-137679894
LicenseMIT

@carsonbotcarsonbot added this to the6.4 milestoneMay 19, 2025
@OskarStarkOskarStark changed the title[Validator] add missing$extensions and$extensionsMessage to the Image constraint[Validator] add missing$extensions and$extensionsMessage to theImage constraintMay 19, 2025
@@ -192,6 +196,10 @@ public function __construct(
$this->allowPortraitMessage =$allowPortraitMessage ??$this->allowPortraitMessage;
$this->corruptedMessage =$corruptedMessage ??$this->corruptedMessage;

if (null ===$this->mimeTypes && [] ===$this->extensions) {

Choose a reason for hiding this comment

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

doesn't the second check change the behavior? extensions is null by default, so we won't set mimeTypes to its default anymore, right?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The property is initialised with an empty array in the parent class which then also has this line in its constructor (which is called before the code here is run):

$this->extensions =$extensions ??$this->extensions;

nicolas-grekas reacted with thumbs up emoji
@nicolas-grekas
Copy link
Member

Thank you@xabbuh.

@nicolas-grekasnicolas-grekas merged commit4832299 intosymfony:6.4May 20, 2025
15 of 17 checks passed
@xabbuhxabbuh deleted the pr-47710 branchMay 20, 2025 13:00
This was referencedMay 25, 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

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

3 participants
@xabbuh@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp