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 68d1426

Browse filesBrowse files
committed
Fix deprecation on 4.3
1 parent b406466 commit 68d1426
Copy full SHA for 68d1426

File tree

21 files changed

+238
-136
lines changed
Filter options

21 files changed

+238
-136
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ matrix:
3030
env: deps=high
3131
- php: 7.3
3232
env: deps=low
33+
- php: 7.4snapshot
34+
allow_failures:
35+
- php: 7.4snapshot
3336
fast_finish: true
3437

3538
cache:

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public function testPrivateAlias()
5757

5858
$tester = new ApplicationTester($application);
5959
$tester->run(['command' => 'debug:container', '--show-hidden' => true]);
60-
$this->assertNotContains('public', $tester->getDisplay());
61-
$this->assertNotContains('private_alias', $tester->getDisplay());
60+
$this->assertStringNotContainsString('public', $tester->getDisplay());
61+
$this->assertStringNotContainsString('private_alias', $tester->getDisplay());
6262

6363
$tester->run(['command' => 'debug:container']);
6464
$this->assertStringContainsString('public', $tester->getDisplay());
@@ -77,7 +77,7 @@ public function testIgnoreBackslashWhenFindingService(string $validServiceId)
7777

7878
$tester = new ApplicationTester($application);
7979
$tester->run(['command' => 'debug:container', 'name' => $validServiceId]);
80-
$this->assertNotContains('No services found', $tester->getDisplay());
80+
$this->assertStringNotContainsString('No services found', $tester->getDisplay());
8181
}
8282

8383
public function testDescribeEnvVars()

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public function testEncodePasswordSodiumOutput()
227227
'user-class' => 'Custom\Class\Sodium\User',
228228
], ['interactive' => false]);
229229

230-
$this->assertNotContains(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
230+
$this->assertStringNotContainsString(' Generated salt ', $this->passwordEncoderCommandTester->getDisplay());
231231
}
232232

233233
public function testEncodePasswordNoConfigForGivenUserClass()

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Cache\IntegrationTests\CachePoolTest;
1515
use PHPUnit\Framework\Assert;
16+
use PHPUnit\Framework\Warning;
1617
use Psr\Cache\CacheItemInterface;
1718
use Psr\Cache\CacheItemPoolInterface;
1819
use Symfony\Component\Cache\CacheItem;
@@ -120,7 +121,7 @@ public function testGetMetadata()
120121
CacheItem::METADATA_EXPIRY => 9.5 + time(),
121122
CacheItem::METADATA_CTIME => 1000,
122123
];
123-
$this->assertEquals($expected, $item->getMetadata(), 'Item metadata should embed expiry and ctime.', .6);
124+
$this->assertEqualsWithDelta($expected, $item->getMetadata(), .6, 'Item metadata should embed expiry and ctime.');
124125
}
125126

126127
public function testDefaultLifeTime()
@@ -252,6 +253,15 @@ public function testPrune()
252253
$this->assertFalse($this->isPruned($cache, 'foo'));
253254
$this->assertTrue($this->isPruned($cache, 'qux'));
254255
}
256+
257+
public function testSavingObject()
258+
{
259+
if (\PHP_VERSION_ID >= 70400) {
260+
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
261+
}
262+
263+
parent::testSavingObject();
264+
}
255265
}
256266

257267
class NotUnserializable

‎src/Symfony/Component/Config/Tests/Definition/Builder/NodeDefinitionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Tests/Definition/Builder/NodeDefinitionTest.php
+15-16Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,25 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
1616
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
17-
use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition;
1817

1918
class NodeDefinitionTest extends TestCase
2019
{
21-
public function testDefaultPathSeparatorIsDot()
22-
{
23-
$node = $this->getMockForAbstractClass(NodeDefinition::class, ['foo']);
24-
25-
$this->assertAttributeSame('.', 'pathSeparator', $node);
26-
}
27-
2820
public function testSetPathSeparatorChangesChildren()
2921
{
30-
$node = new ArrayNodeDefinition('foo');
31-
$scalar = new ScalarNodeDefinition('bar');
32-
$node->append($scalar);
33-
34-
$node->setPathSeparator('/');
35-
36-
$this->assertAttributeSame('/', 'pathSeparator', $node);
37-
$this->assertAttributeSame('/', 'pathSeparator', $scalar);
22+
$parentNode = new ArrayNodeDefinition('name');
23+
$childNode = $this->createMock(NodeDefinition::class);
24+
25+
$childNode
26+
->expects($this->once())
27+
->method('setPathSeparator')
28+
->with('/');
29+
$childNode
30+
->expects($this->once())
31+
->method('setParent')
32+
->with($parentNode)
33+
->willReturn($childNode);
34+
$parentNode->append($childNode);
35+
36+
$parentNode->setPathSeparator('/');
3837
}
3938
}

‎src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
+135-80Lines changed: 135 additions & 80 deletions
Large diffs are not rendered by default.

‎src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ public function testRegisterClassesWithExclude()
142142

143143
public function testRegisterClassesWithExcludeAsArray()
144144
{
145+
if (\PHP_VERSION_ID >= 70400) {
146+
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
147+
}
148+
145149
$container = new ContainerBuilder();
146150
$container->setParameter('sub_dir', 'Sub');
147151
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ public function testChoiceTranslationLocaleOption()
5151
->createView()->vars['choices'];
5252

5353
// Don't check objects for identity
54-
$this->assertContains(new ChoiceView('DE', 'DE', 'Німеччина'), $choices, '', false, false);
55-
$this->assertContains(new ChoiceView('GB', 'GB', 'Велика Британія'), $choices, '', false, false);
56-
$this->assertContains(new ChoiceView('US', 'US', 'Сполучені Штати'), $choices, '', false, false);
57-
$this->assertContains(new ChoiceView('FR', 'FR', 'Франція'), $choices, '', false, false);
58-
$this->assertContains(new ChoiceView('MY', 'MY', 'Малайзія'), $choices, '', false, false);
54+
$this->assertContainsEquals(new ChoiceView('DE', 'DE', 'Німеччина'), $choices);
55+
$this->assertContainsEquals(new ChoiceView('GB', 'GB', 'Велика Британія'), $choices);
56+
$this->assertContainsEquals(new ChoiceView('US', 'US', 'Сполучені Штати'), $choices);
57+
$this->assertContainsEquals(new ChoiceView('FR', 'FR', 'Франція'), $choices);
58+
$this->assertContainsEquals(new ChoiceView('MY', 'MY', 'Малайзія'), $choices);
5959
}
6060

6161
public function testUnknownCountryIsNotIncluded()

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public function testChoiceTranslationLocaleOption()
4848
->createView()->vars['choices'];
4949

5050
// Don't check objects for identity
51-
$this->assertContains(new ChoiceView('EUR', 'EUR', 'євро'), $choices, '', false, false);
52-
$this->assertContains(new ChoiceView('USD', 'USD', 'долар США'), $choices, '', false, false);
53-
$this->assertContains(new ChoiceView('SIT', 'SIT', 'словенський толар'), $choices, '', false, false);
51+
$this->assertContainsEquals(new ChoiceView('EUR', 'EUR', 'євро'), $choices);
52+
$this->assertContainsEquals(new ChoiceView('USD', 'USD', 'долар США'), $choices);
53+
$this->assertContainsEquals(new ChoiceView('SIT', 'SIT', 'словенський толар'), $choices);
5454
}
5555

5656
public function testSubmitNull($expected = null, $norm = null, $view = null)

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public function testChoiceTranslationLocaleOption()
5050
->createView()->vars['choices'];
5151

5252
// Don't check objects for identity
53-
$this->assertContains(new ChoiceView('en', 'en', 'англійська'), $choices, '', false, false);
54-
$this->assertContains(new ChoiceView('en_US', 'en_US', 'англійська (США)'), $choices, '', false, false);
55-
$this->assertContains(new ChoiceView('fr', 'fr', 'французька'), $choices, '', false, false);
56-
$this->assertContains(new ChoiceView('my', 'my', 'бірманська'), $choices, '', false, false);
53+
$this->assertContainsEquals(new ChoiceView('en', 'en', 'англійська'), $choices);
54+
$this->assertContainsEquals(new ChoiceView('en_US', 'en_US', 'англійська (США)'), $choices);
55+
$this->assertContainsEquals(new ChoiceView('fr', 'fr', 'французька'), $choices);
56+
$this->assertContainsEquals(new ChoiceView('my', 'my', 'бірманська'), $choices);
5757
}
5858

5959
public function testMultipleLanguagesIsNotIncluded()

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public function testChoiceTranslationLocaleOption()
4848
->createView()->vars['choices'];
4949

5050
// Don't check objects for identity
51-
$this->assertContains(new ChoiceView('en', 'en', 'англійська'), $choices, '', false, false);
52-
$this->assertContains(new ChoiceView('en_GB', 'en_GB', 'англійська (Велика Британія)'), $choices, '', false, false);
53-
$this->assertContains(new ChoiceView('zh_Hant_MO', 'zh_Hant_MO', 'китайська (традиційна, Макао, О.А.Р Китаю)'), $choices, '', false, false);
51+
$this->assertContainsEquals(new ChoiceView('en', 'en', 'англійська'), $choices);
52+
$this->assertContainsEquals(new ChoiceView('en_GB', 'en_GB', 'англійська (Велика Британія)'), $choices);
53+
$this->assertContainsEquals(new ChoiceView('zh_Hant_MO', 'zh_Hant_MO', 'китайська (традиційна, Макао, О.А.Р Китаю)'), $choices);
5454
}
5555

5656
public function testSubmitNull($expected = null, $norm = null, $view = null)

‎src/Symfony/Component/Mailer/Tests/Transport/AbstractTransportTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Tests/Transport/AbstractTransportTest.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ public function testThrottling()
3131

3232
$start = time();
3333
$transport->send($message, $envelope);
34-
$this->assertEquals(0, time() - $start, '', 1);
34+
$this->assertEqualsWithDelta(0, time() - $start, 1);
3535
$transport->send($message, $envelope);
36-
$this->assertEquals(5, time() - $start, '', 1);
36+
$this->assertEqualsWithDelta(5, time() - $start, 1);
3737
$transport->send($message, $envelope);
38-
$this->assertEquals(10, time() - $start, '', 1);
38+
$this->assertEqualsWithDelta(10, time() - $start, 1);
3939
$transport->send($message, $envelope);
40-
$this->assertEquals(15, time() - $start, '', 1);
40+
$this->assertEqualsWithDelta(15, time() - $start, 1);
4141

4242
$start = time();
4343
$transport->setMaxPerSecond(-3);
4444
$transport->send($message, $envelope);
45-
$this->assertEquals(0, time() - $start, '', 1);
45+
$this->assertEqualsWithDelta(0, time() - $start, 1);
4646
$transport->send($message, $envelope);
47-
$this->assertEquals(0, time() - $start, '', 1);
47+
$this->assertEqualsWithDelta(0, time() - $start, 1);
4848
}
4949
}

‎src/Symfony/Component/Messenger/Tests/Handler/HandlersLocatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Tests/Handler/HandlersLocatorTest.php
+11-4Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class HandlersLocatorTest extends TestCase
2222
{
2323
public function testItYieldsHandlerDescriptors()
2424
{
25-
$handler = $this->createPartialMock(\stdClass::class, ['__invoke']);
25+
$handler = $this->createPartialMock(HandlersLocatorTestCallable::class, ['__invoke']);
2626
$locator = new HandlersLocator([
2727
DummyMessage::class => [$handler],
2828
]);
@@ -32,13 +32,13 @@ public function testItYieldsHandlerDescriptors()
3232

3333
public function testItReturnsOnlyHandlersMatchingTransport()
3434
{
35-
$firstHandler = $this->createPartialMock(\stdClass::class, ['__invoke']);
36-
$secondHandler = $this->createPartialMock(\stdClass::class, ['__invoke']);
35+
$firstHandler = $this->createPartialMock(HandlersLocatorTestCallable::class, ['__invoke']);
36+
$secondHandler = $this->createPartialMock(HandlersLocatorTestCallable::class, ['__invoke']);
3737

3838
$locator = new HandlersLocator([
3939
DummyMessage::class => [
4040
$first = new HandlerDescriptor($firstHandler, ['alias' => 'one']),
41-
new HandlerDescriptor($this->createPartialMock(\stdClass::class, ['__invoke']), ['from_transport' => 'ignored', 'alias' => 'two']),
41+
new HandlerDescriptor($this->createPartialMock(HandlersLocatorTestCallable::class, ['__invoke']), ['from_transport' => 'ignored', 'alias' => 'two']),
4242
$second = new HandlerDescriptor($secondHandler, ['from_transport' => 'transportName', 'alias' => 'three']),
4343
],
4444
]);
@@ -51,3 +51,10 @@ public function testItReturnsOnlyHandlersMatchingTransport()
5151
)));
5252
}
5353
}
54+
55+
class HandlersLocatorTestCallable
56+
{
57+
public function __invoke()
58+
{
59+
}
60+
}

‎src/Symfony/Component/Messenger/Tests/Middleware/ActivationMiddlewareTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Tests/Middleware/ActivationMiddlewareTest.php
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testExecuteMiddlewareOnActivatedWithCallable()
4242
$message = new DummyMessage('Hello');
4343
$envelope = new Envelope($message);
4444

45-
$activated = $this->createPartialMock(\stdClass::class, ['__invoke']);
45+
$activated = $this->createPartialMock(ActivationMiddlewareTestCallable::class, ['__invoke']);
4646
$activated->expects($this->once())->method('__invoke')->with($envelope)->willReturn(true);
4747

4848
$stack = $this->getStackMock(false);
@@ -68,3 +68,10 @@ public function testExecuteMiddlewareOnDeactivated()
6868
$decorator->handle($envelope, $this->getStackMock());
6969
}
7070
}
71+
72+
class ActivationMiddlewareTestCallable
73+
{
74+
public function __invoke()
75+
{
76+
}
77+
}

‎src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php
+11-4Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testItCallsTheHandlerAndNextMiddleware()
2828
$message = new DummyMessage('Hey');
2929
$envelope = new Envelope($message);
3030

31-
$handler = $this->createPartialMock(\stdClass::class, ['__invoke']);
31+
$handler = $this->createPartialMock(HandleMessageMiddlewareTestCallable::class, ['__invoke']);
3232

3333
$middleware = new HandleMessageMiddleware(new HandlersLocator([
3434
DummyMessage::class => [$handler],
@@ -62,15 +62,15 @@ public function testItAddsHandledStamps(array $handlers, array $expectedStamps,
6262

6363
public function itAddsHandledStampsProvider()
6464
{
65-
$first = $this->createPartialMock(\stdClass::class, ['__invoke']);
65+
$first = $this->createPartialMock(HandleMessageMiddlewareTestCallable::class, ['__invoke']);
6666
$first->method('__invoke')->willReturn('first result');
6767
$firstClass = \get_class($first);
6868

69-
$second = $this->createPartialMock(\stdClass::class, ['__invoke']);
69+
$second = $this->createPartialMock(HandleMessageMiddlewareTestCallable::class, ['__invoke']);
7070
$second->method('__invoke')->willReturn(null);
7171
$secondClass = \get_class($second);
7272

73-
$failing = $this->createPartialMock(\stdClass::class, ['__invoke']);
73+
$failing = $this->createPartialMock(HandleMessageMiddlewareTestCallable::class, ['__invoke']);
7474
$failing->method('__invoke')->will($this->throwException(new \Exception('handler failed.')));
7575

7676
yield 'A stamp is added' => [
@@ -129,3 +129,10 @@ public function testAllowNoHandlers()
129129
$this->assertInstanceOf(Envelope::class, $middleware->handle(new Envelope(new DummyMessage('Hey')), new StackMiddleware()));
130130
}
131131
}
132+
133+
class HandleMessageMiddlewareTestCallable
134+
{
135+
public function __invoke()
136+
{
137+
}
138+
}

‎src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineSenderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineSenderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testSend()
2828
$encoded = ['body' => '...', 'headers' => ['type' => DummyMessage::class]];
2929

3030
$connection = $this->createMock(Connection::class);
31-
$connection->expects($this->once())->method('send')->with($encoded['body'], $encoded['headers'])->willReturn(15);
31+
$connection->expects($this->once())->method('send')->with($encoded['body'], $encoded['headers'])->willReturn('15');
3232

3333
$serializer = $this->createMock(SerializerInterface::class);
3434
$serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);

‎src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Tests/Transport/Serialization/PhpSerializerTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testEncodedIsDecodable()
2727
$envelope = new Envelope(new DummyMessage('Hello'));
2828

2929
$encoded = $serializer->encode($envelope);
30-
$this->assertNotContains("\0", $encoded['body'], 'Does not contain the binary characters');
30+
$this->assertStringNotContainsString("\0", $encoded['body'], 'Does not contain the binary characters');
3131
$this->assertEquals($envelope, $serializer->decode($encoded));
3232
}
3333

@@ -74,7 +74,7 @@ public function testEncodedSkipsNonEncodeableStamps()
7474
]);
7575

7676
$encoded = $serializer->encode($envelope);
77-
$this->assertNotContains('DummyPhpSerializerNonSendableStamp', $encoded['body']);
77+
$this->assertStringNotContainsString('DummyPhpSerializerNonSendableStamp', $encoded['body']);
7878
}
7979
}
8080

‎src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function testEncodedSkipsNonEncodeableStamps()
205205
]);
206206

207207
$encoded = $serializer->encode($envelope);
208-
$this->assertNotContains('DummySymfonySerializerNonSendableStamp', print_r($encoded['headers'], true));
208+
$this->assertStringNotContainsString('DummySymfonySerializerNonSendableStamp', print_r($encoded['headers'], true));
209209
}
210210
}
211211
class DummySymfonySerializerNonSendableStamp implements NonSendableStampInterface

‎src/Symfony/Component/Messenger/Transport/Sync/SyncTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Transport/Sync/SyncTransport.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function send(Envelope $envelope): Envelope
5858
{
5959
/** @var SentStamp|null $sentStamp */
6060
$sentStamp = $envelope->last(SentStamp::class);
61-
$alias = null === $sentStamp ? 'sync' : $sentStamp->getSenderAlias() ?: $sentStamp->getSenderClass();
61+
$alias = null === $sentStamp ? 'sync' : ($sentStamp->getSenderAlias() ?: $sentStamp->getSenderClass());
6262

6363
$envelope = $envelope->with(new ReceivedStamp($alias));
6464

‎src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Tests/Cloner/VarClonerTest.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ public function testPhp74()
466466
[position] => 1
467467
[attr] => Array
468468
(
469+
[file] => %s
470+
[line] => 5
469471
)
470472
471473
)

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarExporter/Tests/VarExporterTest.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\VarExporter\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use PHPUnit\Framework\Warning;
1516
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
1617
use Symfony\Component\VarExporter\Internal\Registry;
1718
use Symfony\Component\VarExporter\VarExporter;
@@ -75,6 +76,13 @@ public function provideFailingSerialization()
7576
*/
7677
public function testExport(string $testName, $value, bool $staticValueExpected = false)
7778
{
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+
}
82+
if (\PHP_VERSION_ID >= 70400 && \in_array($testName, ['spl-object-storage', 'array-object-custom', 'array-iterator', 'array-object', 'final-array-iterator'])) {
83+
throw new Warning('PHP 7.4 breaks this test.');
84+
}
85+
7886
$dumpedValue = $this->getDump($value);
7987
$isStaticValue = true;
8088
$marshalledValue = VarExporter::export($value, $isStaticValue);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.