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] Fix Choice constraint with associative choices array#44860

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

Conversation

@derrabus
Copy link
Member

@derrabusderrabus commentedDec 29, 2021
edited
Loading

QA
Branch?5.3
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#41508
LicenseMIT
Doc PRN/A

This PR moves the$options parameter to the beginning of the constructor signature in order to fix the scenario described in#41508.

I assume that the supported ways to construct this class are either an ordered arguments call with exactly one argument or a named argument call with zero or one ordered arguments. Those scenarios should continue to work and are covered with additional tests now.

However, an ordered arguments call to the constructor with at least two parameters would break after this change.

@carsonbotcarsonbot added this to the5.3 milestoneDec 29, 2021
@carsonbotcarsonbot changed the titleFix Choice constraint with associative choices array[Validator] Fix Choice constraint with associative choices arrayDec 29, 2021
@derrabusderrabusforce-pushed thebugfix/choice-with-string-key branch from4cfb9a8 tocd1d812CompareDecember 29, 2021 23:43
@carsonbot
Copy link

Hey!

I think@Andrej-in-ua has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@nicolas-grekasnicolas-grekasforce-pushed thebugfix/choice-with-string-key branch fromcd1d812 toccd85feCompareJanuary 26, 2022 16:24
@nicolas-grekas
Copy link
Member

Thank you@derrabus.

@nicolas-grekasnicolas-grekas merged commit5044a0a intosymfony:5.3Jan 26, 2022
This was referencedJan 28, 2022
@derrabusderrabus deleted the bugfix/choice-with-string-key branchJanuary 28, 2022 14:23
nicolas-grekas referenced this pull request in symfony/validatorJan 28, 2022
* 5.3:  Fix Choice constraint with associative choices array  [Form] UrlType should not add protocol to emails  Silence isatty warnings during tty detection  [Serializer] Fix AbstractObjectNormalizer not considering pseudo type false  [Notifier] Fix encoding of messages with FreeMobileTransport  [Cache] workaround PHP crash  [Console] Fix PHP 8.1 deprecation in ChoiceQuestion  [Notifier] smsapi-notifier - correct encoding  Replaced full CoC text with link to documentation  Making the parser stateless  [Console] fix restoring stty mode on CTRL+C  fix merge (bis)  fix merge  [Process] Avoid calling fclose on an already closed resource  [GHA] test tty group  [DI] Fix tests on PHP 7.1
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

@ycerutoycerutoyceruto approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.3

Development

Successfully merging this pull request may close these issues.

4 participants

@derrabus@carsonbot@nicolas-grekas@yceruto

[8]ページ先頭

©2009-2025 Movatter.jp