diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php index 9923b032c048..1fa8883a7833 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php @@ -11,7 +11,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; -use PHPUnit\Framework\Warning; use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer; use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use Symfony\Component\Cache\Adapter\ArrayAdapter; @@ -22,12 +21,11 @@ class ValidatorCacheWarmerTest extends TestCase { + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testWarmUp() { - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } - $validatorBuilder = new ValidatorBuilder(); $validatorBuilder->addXmlMapping(__DIR__.'/../Fixtures/Validation/Resources/person.xml'); $validatorBuilder->addYamlMapping(__DIR__.'/../Fixtures/Validation/Resources/author.yml'); diff --git a/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php index 5b1ec6461f41..44450c32b785 100644 --- a/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Config\Tests\Resource; use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Warning; use Symfony\Component\Config\Resource\ClassExistenceResource; use Symfony\Component\Config\Tests\Fixtures\BadParent; use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass; @@ -76,23 +75,22 @@ public function testExistsKo() } } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testBadParentWithTimestamp() { - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } - $res = new ClassExistenceResource(BadParent::class, false); $this->assertTrue($res->isFresh(time())); } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testBadParentWithNoTimestamp() { $this->expectException('ReflectionException'); $this->expectExceptionMessage('Class Symfony\Component\Config\Tests\Fixtures\MissingParent not found'); - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } $res = new ClassExistenceResource(BadParent::class, false); $res->isFresh(0); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php index 84d396bebaed..e84968100736 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\DependencyInjection\Tests\Compiler; use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Warning; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\Compiler\AutowirePass; use Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass; @@ -378,13 +377,13 @@ public function testClassNotFoundThrowsException() $pass->process($container); } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testParentClassNotFoundThrowsException() { $this->expectException('Symfony\Component\DependencyInjection\Exception\AutowiringFailedException'); $this->expectExceptionMessage('Cannot autowire service "a": argument "$r" of method "Symfony\Component\DependencyInjection\Tests\Compiler\BadParentTypeHintedArgument::__construct()" has type "Symfony\Component\DependencyInjection\Tests\Compiler\OptionalServiceClass" but this class is missing a parent class (Class Symfony\Bug\NotExistClass not found).'); - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } $container = new ContainerBuilder(); @@ -692,12 +691,11 @@ public function getCreateResourceTests() ]; } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testIgnoreServiceWithClassNotExisting() { - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } - $container = new ContainerBuilder(); $container->register('class_not_exist', __NAMESPACE__.'\OptionalServiceClass'); @@ -894,13 +892,13 @@ public function testExceptionWhenAliasExists() $pass->process($container); } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testExceptionWhenAliasDoesNotExist() { $this->expectException('Symfony\Component\DependencyInjection\Exception\AutowiringFailedException'); $this->expectExceptionMessage('Cannot autowire service "j": argument "$i" of method "Symfony\Component\DependencyInjection\Tests\Compiler\J::__construct()" references class "Symfony\Component\DependencyInjection\Tests\Compiler\I" but no such service exists. You should maybe alias this class to one of these existing services: "i", "i2".'); - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } $container = new ContainerBuilder(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php index 85d6e02622f4..c91eeadfd99a 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\DependencyInjection\Tests\Compiler; use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Warning; use Symfony\Component\DependencyInjection\Argument\BoundArgument; use Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass; use Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass; @@ -62,13 +61,13 @@ public function testUnusedBinding() $pass->process($container); } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testMissingParent() { $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException'); $this->expectExceptionMessageRegExp('/Unused binding "\$quz" in service [\s\S]+/'); - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } $container = new ContainerBuilder(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 1d3aa33978f4..20f9da9e145f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\DependencyInjection\Tests\Dumper; use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Warning; use Psr\Container\ContainerInterface; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\Argument\IteratorArgument; @@ -894,12 +893,11 @@ public function testInlineSelfRef() $this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_self_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref'])); } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testHotPathOptimizations() { - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } - $container = include self::$fixturesPath.'/containers/container_inline_requires.php'; $container->setParameter('inline_requires', true); $container->compile(); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php index 7d002ff03093..3a2b5931502b 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\DependencyInjection\Tests\Loader; use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Warning; use Psr\Container\ContainerInterface as PsrContainerInterface; use Symfony\Component\Config\FileLocator; use Symfony\Component\Config\Loader\LoaderResolver; @@ -108,12 +107,11 @@ public function testRegisterClasses() ); } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testRegisterClassesWithExclude() { - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } - $container = new ContainerBuilder(); $container->setParameter('other_dir', 'OtherDir'); $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures')); @@ -141,12 +139,11 @@ public function testRegisterClassesWithExclude() ); } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testNestedRegisterClasses() { - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } - $container = new ContainerBuilder(); $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures')); @@ -173,12 +170,11 @@ public function testNestedRegisterClasses() $this->assertFalse($alias->isPrivate()); } + /** + * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995 + */ public function testMissingParentClass() { - if (\PHP_VERSION_ID >= 70400) { - throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.'); - } - $container = new ContainerBuilder(); $container->setParameter('bad_classes_dir', 'BadClasses'); $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));