Skip to content

Commit 2506aa4

Browse files
minor #32889 [PhpUnitBridge] Remove use of ForwardCompatTrait (jderusse)
This PR was merged into the 3.4 branch. Discussion ---------- [PhpUnitBridge] Remove use of ForwardCompatTrait | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32844 | License | MIT | Doc PR | NA With #32882 the ForwardCompatibilityTrait is injected in TestCase which now act as a true polyfill Commits ------- ac6242f36b Remove use of ForwardCompatTrait
2 parents 4932f41 + 9e5d61d commit 2506aa4

Some content is hidden

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

49 files changed

+19
-166
lines changed

Tests/ConstraintTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Validator\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Validator\Constraint;
1716
use Symfony\Component\Validator\Tests\Fixtures\ClassConstraint;
1817
use Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
@@ -23,8 +22,6 @@
2322

2423
class ConstraintTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
public function testSetProperties()
2926
{
3027
$constraint = new ConstraintA([

Tests/ConstraintViolationListTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,19 @@
1212
namespace Symfony\Component\Validator\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Validator\ConstraintViolation;
1716
use Symfony\Component\Validator\ConstraintViolationList;
1817

1918
class ConstraintViolationListTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
protected $list;
2421

25-
private function doSetUp()
22+
protected function setUp()
2623
{
2724
$this->list = new ConstraintViolationList();
2825
}
2926

30-
private function doTearDown()
27+
protected function tearDown()
3128
{
3229
$this->list = null;
3330
}

Tests/Constraints/AbstractComparisonValidatorTestCase.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Component\Intl\Util\IntlTestHelper;
1615
use Symfony\Component\Validator\Constraint;
1716
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
@@ -42,8 +41,6 @@ public function getValue()
4241
*/
4342
abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTestCase
4443
{
45-
use ForwardCompatTestTrait;
46-
4744
protected static function addPhp5Dot5Comparisons(array $comparisons)
4845
{
4946
$result = $comparisons;

Tests/Constraints/AllTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Validator\Constraints\All;
1716
use Symfony\Component\Validator\Constraints\Valid;
1817

@@ -21,8 +20,6 @@
2120
*/
2221
class AllTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
public function testRejectNonConstraints()
2724
{
2825
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');

Tests/Constraints/AllValidatorTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Component\Validator\Constraints\All;
1615
use Symfony\Component\Validator\Constraints\AllValidator;
1716
use Symfony\Component\Validator\Constraints\NotNull;
@@ -20,8 +19,6 @@
2019

2120
class AllValidatorTest extends ConstraintValidatorTestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
protected function createValidator()
2623
{
2724
return new AllValidator();

Tests/Constraints/CallbackValidatorTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Component\Validator\Constraint;
1615
use Symfony\Component\Validator\Constraints\Callback;
1716
use Symfony\Component\Validator\Constraints\CallbackValidator;
@@ -47,8 +46,6 @@ public static function validateStatic($object, ExecutionContextInterface $contex
4746

4847
class CallbackValidatorTest extends ConstraintValidatorTestCase
4948
{
50-
use ForwardCompatTestTrait;
51-
5249
protected function createValidator()
5350
{
5451
return new CallbackValidator();

Tests/Constraints/ChoiceValidatorTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Component\Validator\Constraints\Choice;
1615
use Symfony\Component\Validator\Constraints\ChoiceValidator;
1716
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
@@ -23,8 +22,6 @@ function choice_callback()
2322

2423
class ChoiceValidatorTest extends ConstraintValidatorTestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
protected function createValidator()
2926
{
3027
return new ChoiceValidator();

Tests/Constraints/CollectionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Validator\Constraints\Collection;
1716
use Symfony\Component\Validator\Constraints\Email;
1817
use Symfony\Component\Validator\Constraints\Optional;
@@ -24,8 +23,6 @@
2423
*/
2524
class CollectionTest extends TestCase
2625
{
27-
use ForwardCompatTestTrait;
28-
2926
public function testRejectInvalidFieldsOption()
3027
{
3128
$this->expectException('Symfony\Component\Validator\Exception\ConstraintDefinitionException');

Tests/Constraints/CollectionValidatorTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Component\Validator\Constraints\Collection;
1615
use Symfony\Component\Validator\Constraints\CollectionValidator;
1716
use Symfony\Component\Validator\Constraints\NotNull;
@@ -22,8 +21,6 @@
2221

2322
abstract class CollectionValidatorTest extends ConstraintValidatorTestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
protected function createValidator()
2825
{
2926
return new CollectionValidator();

Tests/Constraints/CompositeTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Validator\Constraints\Composite;
1716
use Symfony\Component\Validator\Constraints\NotBlank;
1817
use Symfony\Component\Validator\Constraints\NotNull;
@@ -38,8 +37,6 @@ public function getDefaultOption()
3837
*/
3938
class CompositeTest extends TestCase
4039
{
41-
use ForwardCompatTestTrait;
42-
4340
public function testMergeNestedGroupsIfNoExplicitParentGroup()
4441
{
4542
$constraint = new ConcreteComposite([

0 commit comments

Comments
 (0)