Skip to content

Commit 060143a

Browse files
Merge branch '6.0' into 6.1
* 6.0: Stick to PHPUnit 8.5.26 [Yaml] Enhance coverage in yaml DumperTest. [PhpUnitBridge] fix tests [Messenger] CS fix
2 parents 4173688 + cf1167a commit 060143a

File tree

8 files changed

+36
-21
lines changed

8 files changed

+36
-21
lines changed

phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) {
1313
if (\PHP_VERSION_ID < 70200) {
1414
putenv('SYMFONY_PHPUNIT_VERSION=7.5');
1515
} elseif (\PHP_VERSION_ID < 70300) {
16-
putenv('SYMFONY_PHPUNIT_VERSION=8.5');
16+
putenv('SYMFONY_PHPUNIT_VERSION=8.5.26');
1717
} else {
1818
putenv('SYMFONY_PHPUNIT_VERSION=9.5');
1919
}

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/baseline.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,4 @@ print "Cannot test baselineFile contents because it is generated in a shutdown f
7878
?>
7979
--EXPECT--
8080
Cannot test baselineFile contents because it is generated in a shutdown function registered by another shutdown function.
81+
Legacy deprecation notices (1)

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/baseline2.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ $foo->testLegacyFoo();
6666
$foo->testNonLegacyBar();
6767
?>
6868
--EXPECTF--
69+
Legacy deprecation notices (1)
70+
6971
Other deprecation notices (2)
7072

7173
1x: root deprecation

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/baseline3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ $foo->testLegacyFoo();
6969
$foo->testNonLegacyBar();
7070
?>
7171
--EXPECTF--
72-
Legacy deprecation notices (1)
72+
Legacy deprecation notices (2)
7373

7474
Other deprecation notices (2)
7575

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/generate_baseline.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ print "Cannot test baselineFile contents because it is generated in a shutdown f
6262
?>
6363
--EXPECT--
6464
Cannot test baselineFile contents because it is generated in a shutdown function registered by another shutdown function.
65+
Legacy deprecation notices (1)

src/Symfony/Component/Messenger/EventListener/ResetServicesListener.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter;
1616
use Symfony\Component\Messenger\Event\WorkerRunningEvent;
1717
use Symfony\Component\Messenger\Event\WorkerStoppedEvent;
18-
use Symfony\Contracts\Service\ResetInterface;
1918

2019
/**
2120
* @author Grégoire Pineau <[email protected]>

src/Symfony/Component/Messenger/Worker.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
use Symfony\Component\Messenger\Stamp\ReceivedStamp;
3030
use Symfony\Component\Messenger\Transport\Receiver\QueueReceiverInterface;
3131
use Symfony\Component\Messenger\Transport\Receiver\ReceiverInterface;
32-
use Symfony\Contracts\Service\ResetInterface;
3332

3433
/**
3534
* @author Samuel Roze <[email protected]>

src/Symfony/Component/Yaml/Tests/DumperTest.php

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class DumperTest extends TestCase
2828
'' => 'bar',
2929
'foo' => '#bar',
3030
'foo\'bar' => [],
31-
'bar' => [1, 'foo'],
31+
'bar' => [1, 'foo', ['a' => 'A']],
3232
'foobar' => [
3333
'foo' => 'bar',
3434
'bar' => [1, 'foo'],
@@ -64,6 +64,8 @@ public function testIndentationInConstructor()
6464
bar:
6565
- 1
6666
- foo
67+
-
68+
a: A
6769
foobar:
6870
foo: bar
6971
bar:
@@ -107,7 +109,7 @@ public function testSpecifications()
107109
public function testInlineLevel()
108110
{
109111
$expected = <<<'EOF'
110-
{ '': bar, foo: '#bar', "foo'bar": { }, bar: [1, foo], foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } }
112+
{ '': bar, foo: '#bar', "foo'bar": { }, bar: [1, foo, { a: A }], foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } }
111113
EOF;
112114
$this->assertEquals($expected, $this->dumper->dump($this->array, -10), '->dump() takes an inline level argument');
113115
$this->assertEquals($expected, $this->dumper->dump($this->array, 0), '->dump() takes an inline level argument');
@@ -116,7 +118,7 @@ public function testInlineLevel()
116118
'': bar
117119
foo: '#bar'
118120
"foo'bar": { }
119-
bar: [1, foo]
121+
bar: [1, foo, { a: A }]
120122
foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } }
121123

122124
EOF;
@@ -129,6 +131,7 @@ public function testInlineLevel()
129131
bar:
130132
- 1
131133
- foo
134+
- { a: A }
132135
foobar:
133136
foo: bar
134137
bar: [1, foo]
@@ -144,6 +147,8 @@ public function testInlineLevel()
144147
bar:
145148
- 1
146149
- foo
150+
-
151+
a: A
147152
foobar:
148153
foo: bar
149154
bar:
@@ -163,6 +168,8 @@ public function testInlineLevel()
163168
bar:
164169
- 1
165170
- foo
171+
-
172+
a: A
166173
foobar:
167174
foo: bar
168175
bar:
@@ -379,8 +386,9 @@ public function testDumpingTaggedValueSequenceRespectsInlineLevel()
379386
new TaggedValue('user', [
380387
'username' => 'jane',
381388
]),
382-
new TaggedValue('user', [
383-
'username' => 'john',
389+
new TaggedValue('names', [
390+
'john',
391+
'claire',
384392
]),
385393
];
386394

@@ -389,8 +397,9 @@ public function testDumpingTaggedValueSequenceRespectsInlineLevel()
389397
$expected = <<<YAML
390398
- !user
391399
username: jane
392-
- !user
393-
username: john
400+
- !names
401+
- john
402+
- claire
394403
395404
YAML;
396405
$this->assertSame($expected, $yaml);
@@ -402,16 +411,17 @@ public function testDumpingTaggedValueSequenceWithInlinedTagValues()
402411
new TaggedValue('user', [
403412
'username' => 'jane',
404413
]),
405-
new TaggedValue('user', [
406-
'username' => 'john',
414+
new TaggedValue('names', [
415+
'john',
416+
'claire',
407417
]),
408418
];
409419

410420
$yaml = $this->dumper->dump($data, 1);
411421

412422
$expected = <<<YAML
413423
- !user { username: jane }
414-
- !user { username: john }
424+
- !names [john, claire]
415425
416426
YAML;
417427
$this->assertSame($expected, $yaml);
@@ -423,8 +433,9 @@ public function testDumpingTaggedValueMapRespectsInlineLevel()
423433
'user1' => new TaggedValue('user', [
424434
'username' => 'jane',
425435
]),
426-
'user2' => new TaggedValue('user', [
427-
'username' => 'john',
436+
'names1' => new TaggedValue('names', [
437+
'john',
438+
'claire',
428439
]),
429440
];
430441

@@ -433,8 +444,9 @@ public function testDumpingTaggedValueMapRespectsInlineLevel()
433444
$expected = <<<YAML
434445
user1: !user
435446
username: jane
436-
user2: !user
437-
username: john
447+
names1: !names
448+
- john
449+
- claire
438450
439451
YAML;
440452
$this->assertSame($expected, $yaml);
@@ -446,16 +458,17 @@ public function testDumpingTaggedValueMapWithInlinedTagValues()
446458
'user1' => new TaggedValue('user', [
447459
'username' => 'jane',
448460
]),
449-
'user2' => new TaggedValue('user', [
450-
'username' => 'john',
461+
'names1' => new TaggedValue('names', [
462+
'john',
463+
'claire',
451464
]),
452465
];
453466

454467
$yaml = $this->dumper->dump($data, 1);
455468

456469
$expected = <<<YAML
457470
user1: !user { username: jane }
458-
user2: !user { username: john }
471+
names1: !names [john, claire]
459472
460473
YAML;
461474
$this->assertSame($expected, $yaml);

0 commit comments

Comments
 (0)