Skip to content

Commit a3b6dca

Browse files
Merge branch '6.4' into 7.2
* 6.4: - CS fixes
2 parents 9b9ddcb + ed9fb80 commit a3b6dca

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

Argument/LazyClosure.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\DependencyInjection\Argument;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15-
use Symfony\Component\DependencyInjection\Definition;
1615
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
1716
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
1817
use Symfony\Component\DependencyInjection\Reference;

Compiler/CheckCircularReferencesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private function checkOutEdges(array $edges): void
6262
continue;
6363
}
6464

65-
$isLeaf = !!$node->getValue();
65+
$isLeaf = (bool) $node->getValue();
6666
$isConcrete = !$edge->isLazy() && !$edge->isWeak();
6767

6868
// Skip already checked lazy services if they are still lazy. Will not gain any new information.

Compiler/ResolveBindingsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
228228

229229
foreach ($names as $key => $name) {
230230
if (\array_key_exists($name, $arguments) && (0 === $key || \array_key_exists($key - 1, $arguments))) {
231-
if (!array_key_exists($key, $arguments)) {
231+
if (!\array_key_exists($key, $arguments)) {
232232
$arguments[$key] = $arguments[$name];
233233
}
234234
unset($arguments[$name]);

Tests/Argument/LazyClosureTest.php

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

1212
namespace Symfony\Component\DependencyInjection\Tests\Argument;
1313

14-
use InvalidArgumentException;
1514
use PHPUnit\Framework\TestCase;
1615
use Symfony\Component\DependencyInjection\Argument\LazyClosure;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -23,7 +22,7 @@ public function testMagicGetThrows()
2322
{
2423
$closure = new LazyClosure(fn () => null);
2524

26-
$this->expectException(InvalidArgumentException::class);
25+
$this->expectException(\InvalidArgumentException::class);
2726
$this->expectExceptionMessage('Cannot read property "foo" from a lazy closure.');
2827

2928
$closure->foo;
@@ -34,7 +33,7 @@ public function testThrowsWhenNotUsingInterface()
3433
$this->expectException(\RuntimeException::class);
3534
$this->expectExceptionMessage('Cannot create adapter for service "foo" because "Symfony\Component\DependencyInjection\Tests\Argument\LazyClosureTest" is not an interface.');
3635

37-
LazyClosure::getCode('foo', [new \stdClass(), 'bar'], LazyClosureTest::class, new ContainerBuilder(), 'foo');
36+
LazyClosure::getCode('foo', [new \stdClass(), 'bar'], self::class, new ContainerBuilder(), 'foo');
3837
}
3938

4039
public function testThrowsOnNonFunctionalInterface()
@@ -62,5 +61,6 @@ public function foo();
6261
interface NonFunctionalInterface
6362
{
6463
public function foo();
64+
6565
public function bar();
6666
}

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ public function testStaticConstructor()
12801280
public function testStaticConstructorWithFactoryThrows()
12811281
{
12821282
$container = new ContainerBuilder();
1283-
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
1283+
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml'));
12841284

12851285
$this->expectException(LogicException::class);
12861286
$this->expectExceptionMessage('The "static_constructor" service cannot declare a factory as well as a constructor.');
@@ -1341,7 +1341,7 @@ public function testUnknownConstantAsKey()
13411341
public function testDeprecatedTagged()
13421342
{
13431343
$container = new ContainerBuilder();
1344-
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
1344+
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml'));
13451345

13461346
$this->expectUserDeprecationMessage(\sprintf('Since symfony/dependency-injection 7.2: Type "tagged" is deprecated for tag <argument>, use "tagged_iterator" instead in "%s/xml%sservices_with_deprecated_tagged.xml".', self::$fixturesPath, \DIRECTORY_SEPARATOR));
13471347

0 commit comments

Comments
 (0)