Skip to content

Move Constraint validator test case to Test namespace #17203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions UPGRADE-3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,33 @@ DependencyInjection

* Calling `get()` on a `ContainerBuilder` instance before compiling the
container is deprecated and will throw an exception in Symfony 4.0.

Validator
---------

* `Tests\Constraints\AbstractConstraintValidatorTest` has been deprecated in
favor of `Test\ConstraintValidatorTestCase`.

Before:

```php
// ...
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;

class MyCustomValidatorTest extends AbstractConstraintValidatorTest
{
// ...
}
```

After:

```php
// ...
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;

class MyCustomValidatorTest extends ConstraintValidatorTestCase
{
// ...
}
```
27 changes: 27 additions & 0 deletions UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,30 @@ Validator
---------

* The `DateTimeValidator::PATTERN` constant was removed.

* `Tests\Constraints\AbstractConstraintValidatorTest` has been removed in
favor of `Test\ConstraintValidatorTestCase`.

Before:

```php
// ...
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;

class MyCustomValidatorTest extends AbstractConstraintValidatorTest
{
// ...
}
```

After:

```php
// ...
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;

class MyCustomValidatorTest extends ConstraintValidatorTestCase
{
// ...
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

/**
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @todo use ConstraintValidatorTestCase when symfony/validator ~3.2 is required.
*/
class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Valid;
use Symfony\Component\Validator\ExecutionContextInterface;
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;

/**
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @todo use ConstraintValidatorTestCase when symfony/validator ~3.2 is required.
*/
class FormValidatorTest extends AbstractConstraintValidatorTest
{
Expand Down
5 changes: 5 additions & 0 deletions src/Symfony/Component/Validator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing version header

3.2.0
-----

* deprecated `Tests\Constraints\AbstractContraintValidatorTest` in favor of `Test\ConstraintValidatorTestCase`

3.1.0
-----

Expand Down
Loading