Skip to content

Conversation

JeroenMoonen
Copy link
Contributor

@JeroenMoonen JeroenMoonen commented Aug 21, 2025

According to the argument list the sorting was incorrect. Correct sorting is:

public function __construct(
        int|array|null $exactly = null,
        ?int $min = null,
        ?int $max = null,
        ?string $charset = null,
        ?callable $normalizer = null,
        ?string $countUnit = null,
        ?string $exactMessage = null,
        ?string $minMessage = null,
        ?string $maxMessage = null,
        ?string $charsetMessage = null,
        ?array $groups = null,
        mixed $payload = null,
        ?array $options = null,
    ) {

@stof
Copy link
Member

stof commented Sep 16, 2025

for named arguments, the order does not matter

@javiereguiluz
Copy link
Member

It's true that named arguments order doesn't matter ... but modern IDEs show annoying messages when the argument order is different when using attributes, so let's merge this. Thanks Jeroen!

@javiereguiluz javiereguiluz merged commit be1ff47 into symfony:main Sep 23, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants