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

Skip to content

Commit ed33a2d

Browse files
committed
Move Constraint validator test case to Test namespace
1 parent b4b1fef commit ed33a2d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+486
-363
lines changed

UPGRADE-3.2.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,33 @@ DependencyInjection
66

77
* Calling `get()` on a `ContainerBuilder` instance before compiling the
88
container is deprecated and will throw an exception in Symfony 4.0.
9+
10+
Validator
11+
---------
12+
13+
* `Tests\Constraints\AbstractConstraintValidatorTest` has been deprecated in
14+
favor of `Test\ConstraintValidatorTestCase`.
15+
16+
Before:
17+
18+
```php
19+
// ...
20+
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
21+
22+
class MyCustomValidatorTest extends AbstractConstraintValidatorTest
23+
{
24+
// ...
25+
}
26+
```
27+
28+
After:
29+
30+
```php
31+
// ...
32+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
33+
34+
class MyCustomValidatorTest extends ConstraintValidatorTestCase
35+
{
36+
// ...
37+
}
38+
```

UPGRADE-4.0.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,30 @@ Validator
199199
---------
200200

201201
* The `DateTimeValidator::PATTERN` constant was removed.
202+
203+
* `Tests\Constraints\AbstractConstraintValidatorTest` has been removed in
204+
favor of `Test\ConstraintValidatorTestCase`.
205+
206+
Before:
207+
208+
```php
209+
// ...
210+
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
211+
212+
class MyCustomValidatorTest extends AbstractConstraintValidatorTest
213+
{
214+
// ...
215+
}
216+
```
217+
218+
After:
219+
220+
```php
221+
// ...
222+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
223+
224+
class MyCustomValidatorTest extends ConstraintValidatorTestCase
225+
{
226+
// ...
227+
}
228+
```

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
/**
2828
* @author Bernhard Schussek <[email protected]>
29+
*
30+
* @todo use ConstraintValidatorTestCase when symfony/validator ~3.2 is required.
2931
*/
3032
class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
3133
{

src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
/**
2828
* @author Bernhard Schussek <[email protected]>
29+
*
30+
* @todo use ConstraintValidatorTestCase when symfony/validator ~3.2 is required.
2931
*/
3032
class FormValidatorTest extends AbstractConstraintValidatorTest
3133
{

src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
1717
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
1818
use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator;
19-
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
19+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
2020

2121
/**
2222
* @author Bernhard Schussek <[email protected]>
2323
*/
24-
abstract class UserPasswordValidatorTest extends AbstractConstraintValidatorTest
24+
abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase
2525
{
2626
const PASSWORD = 's3Cr3t';
2727

src/Symfony/Component/Security/Core/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"symfony/expression-language": "~2.8|~3.0",
2626
"symfony/http-foundation": "~2.8|~3.0",
2727
"symfony/ldap": "~3.1",
28-
"symfony/validator": "~2.8|~3.0",
28+
"symfony/validator": "~3.1",
2929
"psr/log": "~1.0"
3030
},
3131
"suggest": {

src/Symfony/Component/Security/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"symfony/finder": "~2.8|~3.0",
3636
"symfony/polyfill-intl-icu": "~1.0",
3737
"symfony/routing": "~2.8|~3.0",
38-
"symfony/validator": "~2.8|~3.0",
38+
"symfony/validator": "~3.1",
3939
"symfony/expression-language": "~2.8|~3.0",
4040
"symfony/ldap": "~3.1",
4141
"psr/log": "~1.0"

src/Symfony/Component/Validator/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
3.2.0
5+
-----
6+
7+
* deprecated `Tests\Constraints\AbstractContraintValidatorTest` in favor of `Test\ConstraintValidatorTestCase`
8+
49
3.1.0
510
-----
611

0 commit comments

Comments
 (0)