minor #41636 [Validator] Fix tests by making constraint options dumps order consistent (alexandre-daubois)

This PR was merged into the 5.2 branch.

Discussion
----------

[Validator] Fix tests by making constraint options dumps order consistent

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Part of #41552
| License       | MIT
| Doc PR        | N/A

Commits
-------

181d5480c6 [Validator] Fix tests by making constraint options dumps order consistent
This commit is contained in:
Nicolas Grekas 2021-06-09 16:50:47 +02:00
commit 05a7020f4b
2 changed files with 5 additions and 3 deletions

View File

@ -165,6 +165,8 @@ EOF
$options[$propertyName] = $constraint->$propertyName;
}
ksort($options);
return $options;
}

View File

@ -72,8 +72,8 @@ Symfony\Component\Validator\Tests\Dummy\DummyClassOne
| Property | Name | Groups | Options |
+---------------+--------------------------------------------------+---------+------------------------------------------------------------+
| firstArgument | Symfony\Component\Validator\Constraints\NotBlank | Default | [ |
| | | | "message" => "This value should not be blank.", |
| | | | "allowNull" => false, |
| | | | "message" => "This value should not be blank.", |
| | | | "normalizer" => null, |
| | | | "payload" => null |
| | | | ] |
@ -133,8 +133,8 @@ Symfony\Component\Validator\Tests\Dummy\DummyClassOne
| Property | Name | Groups | Options |
+---------------+--------------------------------------------------+---------+------------------------------------------------------------+
| firstArgument | Symfony\Component\Validator\Constraints\NotBlank | Default | [ |
| | | | "message" => "This value should not be blank.", |
| | | | "allowNull" => false, |
| | | | "message" => "This value should not be blank.", |
| | | | "normalizer" => null, |
| | | | "payload" => null |
| | | | ] |
@ -153,8 +153,8 @@ Symfony\Component\Validator\Tests\Dummy\DummyClassTwo
| Property | Name | Groups | Options |
+---------------+--------------------------------------------------+---------+------------------------------------------------------------+
| firstArgument | Symfony\Component\Validator\Constraints\NotBlank | Default | [ |
| | | | "message" => "This value should not be blank.", |
| | | | "allowNull" => false, |
| | | | "message" => "This value should not be blank.", |
| | | | "normalizer" => null, |
| | | | "payload" => null |
| | | | ] |