[Validator] Fix Choice constraint with associative choices array#44860
Merged
nicolas-grekas merged 1 commit intoJan 26, 2022
Conversation
4cfb9a8 to
cd1d812
Compare
|
Hey! I think @Andrej-in-ua has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
nicolas-grekas
approved these changes
Jan 12, 2022
yceruto
approved these changes
Jan 26, 2022
cd1d812 to
ccd85fe
Compare
Member
|
Thank you @derrabus. |
This was referenced Jan 28, 2022
Merged
Merged
Merged
nicolas-grekas
referenced
this pull request
in symfony/validator
Jan 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves the
$optionsparameter 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.