Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 509c7bf

Browse files
committed
[Validator] Moved Optional and Required constraints to dedicated sub namespace.
1 parent bf59018 commit 509c7bf

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/Symfony/Component/Validator/Constraints/Optional.php renamed to src/Symfony/Component/Validator/Constraints/Collection/Optional.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Validator\Constraints;
12+
namespace Symfony\Component\Validator\Constraints\Collection;
1313

1414
use Symfony\Component\Validator\Constraint;
1515

src/Symfony/Component/Validator/Constraints/Required.php renamed to src/Symfony/Component/Validator/Constraints/Collection/Required.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Validator\Constraints;
12+
namespace Symfony\Component\Validator\Constraints\Collection;
1313

1414
use Symfony\Component\Validator\Constraint;
1515

src/Symfony/Component/Validator/Constraints/CollectionValidator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Symfony\Component\Validator\Constraint;
1515
use Symfony\Component\Validator\ConstraintValidator;
1616
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
17+
use Symfony\Component\Validator\Constraints\Collection\Optional;
18+
use Symfony\Component\Validator\Constraints\Collection\Required;
1719

1820
/**
1921
* @api

tests/Symfony/Tests/Component/Validator/Constraints/CollectionValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
use Symfony\Component\Validator\Constraints\Min;
1616
use Symfony\Component\Validator\Constraints\NotBlank;
1717
use Symfony\Component\Validator\Constraints\NotNull;
18-
use Symfony\Component\Validator\Constraints\Required;
19-
use Symfony\Component\Validator\Constraints\Optional;
18+
use Symfony\Component\Validator\Constraints\Collection\Required;
19+
use Symfony\Component\Validator\Constraints\Collection\Optional;
2020
use Symfony\Component\Validator\Constraints\Collection;
2121
use Symfony\Component\Validator\Constraints\CollectionValidator;
2222

0 commit comments

Comments
 (0)