8000 Merge branch '3.4' into 4.3 · symfony/symfony@85c5011 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 85c5011

Browse files
Merge branch '3.4' into 4.3
* 3.4: Replace warning by isolated test
2 parents 38f08ba + 7afc935 commit 85c5011

File tree

8 files changed

+39
-58
lines changed

8 files changed

+39
-58
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php

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

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
1313

14-
use PHPUnit\Framework\Warning;
1514
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer;
1615
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1716
use Symfony\Component\Cache\Adapter\NullAdapter;
@@ -21,12 +20,11 @@
2120

2221
class ValidatorCacheWarmerTest extends TestCase
2322
{
23+
/**
24+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
25+
*/
2426
public function testWarmUp()
2527
{
26-
if (\PHP_VERSION_ID >= 70400) {
27-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
28-
}
29-
3028
$validatorBuilder = new ValidatorBuilder();
3129
$validatorBuilder->addXmlMapping(__DIR__.'/../Fixtures/Validation/Resources/person.xml');
3230
$validatorBuilder->addYamlMapping(__DIR__.'/../Fixtures/Validation/Resources/author.yml');

src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,11 @@ public function testPrune()
254254
$this->assertTrue($this->isPruned($cache, 'qux'));
255255
}
256256

257+
/**
258+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
259+
*/
257260
public function testSavingObject()
258261
{
259-
if (\PHP_VERSION_ID >= 70400) {
260-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
261-
}
262-
263262
parent::testSavingObject();
264263
}
265264
}

src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php

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

1414
use PHPUnit\Framework\TestCase;
15-
use PHPUnit\Framework\Warning;
1615
use Symfony\Component\Config\Resource\ClassExistenceResource;
1716
use Symfony\Component\Config\Tests\Fixtures\BadParent;
1817
use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass;
@@ -76,23 +75,22 @@ public function testExistsKo()
7675
}
7776
}
7877

78+
/**
79+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
80+
*/
7981
public function testBadParentWithTimestamp()
8082
{
81-
if (\PHP_VERSION_ID >= 70400) {
82-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
83-
}
84-
8583
$res = new ClassExistenceResource(BadParent::class, false);
8684
$this->assertTrue($res->isFresh(time()));
8785
}
8886

87+
/**
88+
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
89+
*/
8990
public function testBadParentWithNoTimestamp()
9091
{
9192
$this->expectException('ReflectionException');
9293
$this->expectExceptionMessage('Class Symfony\Component\Config\Tests\Fixtures\MissingParent not found');
93-
if (\PHP_VERSION_ID >= 70400) {
94-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
95-
}
9694

9795
$res = new ClassExistenceResource(BadParent::class, false);
9896
$res->isFresh(0);

src/Symfony/Component/DependencyInjection/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

src/Symfony/Component/DependencyInjection/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

src/Symfony/Component/DependencyInjection/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();

src/Symfony/Component/DependencyInjection/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'));

src/Symfony/Component/VarExporter/Tests/VarExporterTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ public function provideFailingSerialization()
7676
*/
7777
public function testExport(string $testName, $value, bool $staticValueExpected = false)
7878
{
79-
if (\PHP_VERSION_ID >= 70400 && 'datetime' === $testName) {
80-
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78383.');
81-
}
8279
if (\PHP_VERSION_ID >= 70400 && \in_array($testName, ['spl-object-storage', 'array-object-custom', 'array-iterator', 'array-object', 'final-array-iterator'])) {
8380
throw new Warning('PHP 7.4 breaks this test.');
8481
}

0 commit comments

Comments
 (0)
0