minor #39497 [PhpUnitBridge] [phpunit] Stop using deprecated trait (jderusse)
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] [phpunit] Stop using deprecated trait
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
the `SetUpTearDownTrait` trait has been removed in #39487 this PR remove usage of it in branch 4.4
Commits
-------
55ed00cd3c
Stop using deprecated trait
This commit is contained in:
commit
698dadccb1
|
@ -15,12 +15,9 @@ use PHPUnit\Framework\TestCase;
|
||||||
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler;
|
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler;
|
||||||
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler\Deprecation;
|
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler\Deprecation;
|
||||||
use Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV5;
|
use Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV5;
|
||||||
use Symfony\Bridge\PhpUnit\SetUpTearDownTrait;
|
|
||||||
|
|
||||||
class DeprecationTest extends TestCase
|
class DeprecationTest extends TestCase
|
||||||
{
|
{
|
||||||
use SetUpTearDownTrait;
|
|
||||||
|
|
||||||
private static $vendorDir;
|
private static $vendorDir;
|
||||||
private static $prefixDirsPsr4;
|
private static $prefixDirsPsr4;
|
||||||
|
|
||||||
|
@ -261,7 +258,7 @@ class DeprecationTest extends TestCase
|
||||||
rmdir($dir);
|
rmdir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function doSetupBeforeClass()
|
public static function setupBeforeClass(): void
|
||||||
{
|
{
|
||||||
foreach (get_declared_classes() as $class) {
|
foreach (get_declared_classes() as $class) {
|
||||||
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
|
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
|
||||||
|
@ -281,7 +278,7 @@ class DeprecationTest extends TestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function doTearDownAfterClass()
|
public static function tearDownAfterClass(): void
|
||||||
{
|
{
|
||||||
foreach (self::$prefixDirsPsr4 as [$prop, $loader, $prefixDirsPsr4]) {
|
foreach (self::$prefixDirsPsr4 as [$prop, $loader, $prefixDirsPsr4]) {
|
||||||
$prop->setValue($loader, $prefixDirsPsr4);
|
$prop->setValue($loader, $prefixDirsPsr4);
|
||||||
|
|
Reference in New Issue