Skip to content

Commit 7da8189

Browse files
Merge branch '3.4' into 4.3
* 3.4: Replace warning by isolated test
2 parents 4214eac + 9f0bd42 commit 7da8189

File tree

4 files changed

+27
-38
lines changed

4 files changed

+27
-38
lines changed

Tests/Compiler/AutowirePassTest.php

Lines changed: 9 additions & 13 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 PHPUnit\Framework\Warning;
1615
use Psr\Log\LoggerInterface;
1716
use Psr\Log\NullLogger;
1817
use Symfony\Component\Config\FileLocator;
@@ -350,12 +349,11 @@ public function testClassNotFoundThrowsException()
350349
}
351350
}
352351

352+
/**
353+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
354+
*/
353355
public function testParentClassNotFoundThrowsException()
354356
{
355-
if (\PHP_VERSION_ID >= 70400) {
356-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
357-
}
358-
359357
$container = new ContainerBuilder();
360358

361359
$aDefinition = $container->register('a', __NAMESPACE__.'\BadParentTypeHintedArgument');
@@ -627,12 +625,11 @@ public function getCreateResourceTests()
627625
];
628626
}
629627

628+
/**
629+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
630+
*/
630631
public function testIgnoreServiceWithClassNotExisting()
631632
{
632-
if (\PHP_VERSION_ID >= 70400) {
633-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
634-
}
635-
636633
$container = new ContainerBuilder();
637634

638635
$container->register('class_not_exist', __NAMESPACE__.'\OptionalServiceClass');
@@ -833,12 +830,11 @@ public function testExceptionWhenAliasExists()
833830
}
834831
}
835832

833+
/**
834+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
835+
*/
836836
public function testExceptionWhenAliasDoesNotExist()
837837
{
838-
if (\PHP_VERSION_ID >= 70400) {
839-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
840-
}
841-
842838
$container = new ContainerBuilder();
843839

844840
// multiple I instances... but no IInterface alias

Tests/Compiler/ResolveBindingsPassTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public function testUnusedBinding()
6262
$pass->process($container);
6363
}
6464

65+
/**
66+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
67+
*/
6568
public function testMissingParent()
6669
{
6770
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
6871
$this->expectExceptionMessage('A binding is configured for an argument named "$quz" for service "Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists", but no corresponding argument has been found. It may be unused and should be removed, or it may have a typo.');
69-
if (\PHP_VERSION_ID >= 70400) {
70-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
71-
}
7272

7373
$container = new ContainerBuilder();
7474

Tests/Dumper/PhpDumperTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use PHPUnit\Framework\Warning;
1615
use Psr\Container\ContainerInterface;
1716
use Symfony\Component\Config\FileLocator;
1817
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
@@ -1044,12 +1043,11 @@ public function testInlineSelfRef()
10441043
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_self_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref']));
10451044
}
10461045

1046+
/**
1047+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
1048+
*/
10471049
public function testHotPathOptimizations()
10481050
{
1049-
if (\PHP_VERSION_ID >= 70400) {
1050-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
1051-
}
1052-
10531051
$container = include self::$fixturesPath.'/containers/container_inline_requires.php';
10541052
$container->setParameter('inline_requires', true);
10551053
$container->compile();

Tests/Loader/FileLoaderTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use PHPUnit\Framework\Warning;
1615
use Psr\Container\ContainerInterface as PsrContainerInterface;
1716
use Symfony\Component\Config\FileLocator;
1817
use Symfony\Component\Config\Loader\LoaderResolver;
@@ -107,12 +106,11 @@ public function testRegisterClasses()
107106
);
108107
}
109108

109+
/**
110+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
111+
*/
110112
public function testRegisterClassesWithExclude()
111113
{
112-
if (\PHP_VERSION_ID >= 70400) {
113-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
114-
}
115-
116114
$container = new ContainerBuilder();
117115
$container->setParameter('other_dir', 'OtherDir');
118116
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
@@ -140,12 +138,11 @@ public function testRegisterClassesWithExclude()
140138
);
141139
}
142140

141+
/**
142+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
143+
*/
143144
public function testRegisterClassesWithExcludeAsArray()
144145
{
145-
if (\PHP_VERSION_ID >= 70400) {
146-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
147-
}
148-
149146
$container = new ContainerBuilder();
150147
$container->setParameter('sub_dir', 'Sub');
151148
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
@@ -163,12 +160,11 @@ public function testRegisterClassesWithExcludeAsArray()
163160
$this->assertFalse($container->has(DeeperBaz::class));
164161
}
165162

163+
/**
164+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
165+
*/
166166
public function testNestedRegisterClasses()
167167
{
168-
if (\PHP_VERSION_ID >= 70400) {
169-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
170-
}
171-
172168
$container = new ContainerBuilder();
173169
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
174170

@@ -195,12 +191,11 @@ public function testNestedRegisterClasses()
195191
$this->assertFalse($alias->isPrivate());
196192
}
197193

194+
/**
195+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
196+
*/
198197
public function testMissingParentClass()
199198
{
200-
if (\PHP_VERSION_ID >= 70400) {
201-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
202-
}
203-
204199
$container = new ContainerBuilder();
205200
$container->setParameter('bad_classes_dir', 'BadClasses');
206201
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));

0 commit comments

Comments
 (0)