Skip to content

Commit 7a42c1b

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 5e0a736 + 442eb38 commit 7a42c1b

File tree

52 files changed

+18
-168
lines changed

Some content is hidden

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

52 files changed

+18
-168
lines changed

Tests/ChildDefinitionTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\ChildDefinition;
1716
use Symfony\Component\DependencyInjection\DefinitionDecorator;
1817

1918
class ChildDefinitionTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testConstructor()
2421
{
2522
$def = new ChildDefinition('foo');

Tests/Compiler/AutoAliasServicePassTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
1817

1918
class AutoAliasServicePassTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testProcessWithMissingParameter()
2421
{
2522
$this->expectException('Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException');

Tests/Compiler/AutowirePassTest.php

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

1414
use PHPUnit\Framework\TestCase;
1515
use PHPUnit\Framework\Warning;
16-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1716
use Symfony\Component\Config\FileLocator;
1817
use Symfony\Component\DependencyInjection\Compiler\AutowirePass;
1918
use Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass;
@@ -34,8 +33,6 @@
3433
*/
3534
class AutowirePassTest extends TestCase
3635
{
37-
use ForwardCompatTestTrait;
38-
3936
public function testProcess()
4037
{
4138
$container = new ContainerBuilder();

Tests/Compiler/CheckArgumentsValidityPassTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\Compiler\CheckArgumentsValidityPass;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
1817

@@ -21,8 +20,6 @@
2120
*/
2221
class CheckArgumentsValidityPassTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
public function testProcess()
2724
{
2825
$container = new ContainerBuilder();

Tests/Compiler/CheckCircularReferencesPassTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
1716
use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass;
1817
use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass;
@@ -22,8 +21,6 @@
2221

2322
class CheckCircularReferencesPassTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
public function testProcess()
2825
{
2926
$this->expectException('Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException');

Tests/Compiler/CheckDefinitionValidityPassTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\Compiler\CheckDefinitionValidityPass;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
1817

1918
class CheckDefinitionValidityPassTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
public function testProcessDetectsSyntheticNonPublicDefinitions()
2421
{
2522
$this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');

Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
1716
use Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass;
1817
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -21,8 +20,6 @@
2120

2221
class CheckExceptionOnInvalidReferenceBehaviorPassTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
public function testProcess()
2724
{
2825
$container = new ContainerBuilder();

Tests/Compiler/CheckReferenceValidityPassTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
1817
use Symfony\Component\DependencyInjection\Reference;
1918

2019
class CheckReferenceValidityPassTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
public function testProcessDetectsReferenceToAbstractDefinition()
2522
{
2623
$this->expectException('RuntimeException');

Tests/Compiler/DefinitionErrorExceptionPassTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
1817
use Symfony\Component\DependencyInjection\Definition;
1918

2019
class DefinitionErrorExceptionPassTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
public function testThrowsException()
2522
{
2623
$this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');

Tests/Compiler/ExtensionCompilerPassTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1716
use Symfony\Component\DependencyInjection\Compiler\ExtensionCompilerPass;
1817
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -23,12 +22,10 @@
2322
*/
2423
class ExtensionCompilerPassTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
private $container;
2926
private $pass;
3027

31-
private function doSetUp()
28+
protected function setUp()
3229
{
3330
$this->container = new ContainerBuilder();
3431
$this->pass = new ExtensionCompilerPass();

0 commit comments

Comments
 (0)