Skip to content

Commit fc03694

Browse files
Merge branch '3.4' into 4.3
* 3.4: #30432 fix an error message fix paths to detect code owners [Validator] Ensure numeric subpaths do not cause errors on PHP 7.4 Remove unused local variables in tests Make sure to collect child forms created on *_SET_DATA events do not render errors for checkboxes twice
2 parents 12b4a94 + 413a2c0 commit fc03694

8 files changed

+14
-16
lines changed

Dumper/PhpDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public function dump(array $options = [])
256256
foreach ($ids as $id) {
257257
$c .= ' '.$this->doExport($id)." => true,\n";
258258
}
259-
$files['removed-ids.php'] = $c .= "];\n";
259+
$files['removed-ids.php'] = $c."];\n";
260260
}
261261

262262
foreach ($this->generateServiceFiles($services) as $file => $c) {

Tests/Compiler/AnalyzeServiceReferencesPassTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@ public function testProcess()
2424
{
2525
$container = new ContainerBuilder();
2626

27-
$a = $container
27+
$container
2828
->register('a')
2929
->addArgument($ref1 = new Reference('b'))
3030
;
3131

32-
$b = $container
32+
$container
3333
->register('b')
3434
->addMethodCall('setA', [$ref2 = new Reference('a')])
3535
;
3636

37-
$c = $container
37+
$container
3838
->register('c')
3939
->addArgument($ref3 = new Reference('a'))
4040
->addArgument($ref4 = new Reference('b'))
4141
;
4242

43-
$d = $container
43+
$container
4444
->register('d')
4545
->setProperty('foo', $ref5 = new Reference('b'))
4646
;
4747

48-
$e = $container
48+
$container
4949
->register('e')
5050
->setConfigurator([$ref6 = new Reference('b'), 'methodName'])
5151
;

Tests/Compiler/IntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testProcessRemovesAndInlinesRecursively()
5050
->setPublic(true)
5151
;
5252

53-
$b = $container
53+
$container
5454
->register('b', '\stdClass')
5555
->addArgument(new Reference('c'))
5656
->setPublic(false)

Tests/Compiler/ResolveChildDefinitionsPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ public function testBindings()
363363
->setBindings(['a' => '1', 'b' => '2'])
364364
;
365365

366-
$child = $container->setDefinition('child', new ChildDefinition('parent'))
366+
$container->setDefinition('child', new ChildDefinition('parent'))
367367
->setBindings(['b' => 'B', 'c' => 'C'])
368368
;
369369

Tests/Compiler/ResolveClassPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public function testAmbiguousChildDefinition()
8787
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
8888
$this->expectExceptionMessage('Service definition "App\Foo\Child" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.');
8989
$container = new ContainerBuilder();
90-
$parent = $container->register('App\Foo', null);
91-
$child = $container->setDefinition('App\Foo\Child', new ChildDefinition('App\Foo'));
90+
$container->register('App\Foo', null);
91+
$container->setDefinition('App\Foo\Child', new ChildDefinition('App\Foo'));
9292

9393
(new ResolveClassPass())->process($container);
9494
}

Tests/ContainerBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ public function testNoClassFromGlobalNamespaceClassId()
12721272
$this->expectExceptionMessage('The definition for "DateTime" has no class attribute, and appears to reference a class or interface in the global namespace.');
12731273
$container = new ContainerBuilder();
12741274

1275-
$definition = $container->register(\DateTime::class);
1275+
$container->register(\DateTime::class);
12761276
$container->compile();
12771277
}
12781278

@@ -1302,7 +1302,7 @@ public function testNoClassFromNonClassId()
13021302
$this->expectExceptionMessage('The definition for "123_abc" has no class.');
13031303
$container = new ContainerBuilder();
13041304

1305-
$definition = $container->register('123_abc');
1305+
$container->register('123_abc');
13061306
$container->compile();
13071307
}
13081308

@@ -1312,7 +1312,7 @@ public function testNoClassFromNsSeparatorId()
13121312
$this->expectExceptionMessage('The definition for "\foo" has no class.');
13131313
$container = new ContainerBuilder();
13141314

1315-
$definition = $container->register('\\foo');
1315+
$container->register('\\foo');
13161316
$container->compile();
13171317
}
13181318

Tests/Dumper/PhpDumperTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ public function testInlineSelfRef()
10361036
->setPublic(true)
10371037
->addArgument($baz);
10381038

1039-
$passConfig = $container->getCompiler()->getPassConfig();
1039+
$container->getCompiler()->getPassConfig();
10401040
$container->compile();
10411041

10421042
$dumper = new PhpDumper($container);
@@ -1128,7 +1128,6 @@ public function testAdawsonContainer()
11281128
$container->compile();
11291129

11301130
$dumper = new PhpDumper($container);
1131-
$dump = $dumper->dump();
11321131
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_adawson.php', $dumper->dump());
11331132
}
11341133

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,6 @@ public function testTsantosContainer()
882882
$container->compile();
883883

884884
$dumper = new PhpDumper($container);
885-
$dump = $dumper->dump();
886885
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_tsantos.php', $dumper->dump());
887886
}
888887

0 commit comments

Comments
 (0)