Skip to content

Commit e59b17c

Browse files
committed
Definition::addMethodCall() expects arg 3 to be bool
1 parent 705399e commit e59b17c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
8585
$setters = $value->getMethodCalls();
8686
$value->setMethodCalls($withers);
8787
foreach ($setters as $call) {
88-
$value->addMethodCall($call[0], $call[1], $call[2] ?? false);
88+
$value->addMethodCall($call[0], $call[1], isset($call[2]) && $call[2]);
8989
}
9090
}
9191

src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,12 @@ private function parseDefinition(\DOMElement $service, string $file, Definition
339339
}
340340

341341
foreach ($this->getChildren($service, 'call') as $call) {
342-
$definition->addMethodCall($call->getAttribute('method'), $this->getArgumentsAsPhp($call, 'argument', $file), XmlUtils::phpize($call->getAttribute('returns-clone')));
342+
$returnClone = $call->getAttribute('returns-clone');
343+
$definition->addMethodCall(
344+
$call->getAttribute('method'),
345+
$this->getArgumentsAsPhp($call, 'argument', $file),
346+
$returnClone !== '' ? XmlUtils::phpize($returnClone) : false
347+
);
343348
}
344349

345350
$tags = $this->getChildren($service, 'tag');

0 commit comments

Comments
 (0)