Skip to content

Commit ce0822d

Browse files
Merge branch '4.3' into 4.4
* 4.3: Fix merge [DoctrineBridge] try to fix deprecations from doctrine/persistence [DI] Add support for immutable setters in CallTrait [Cache] Propagate expiry when syncing items in ChainAdapter [Routing] fix memoryleak when loading compiled routes [Translation] fix memoryleak in PhpFileLoader
2 parents ef56b33 + 3556480 commit ce0822d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Loader/Configurator/Traits/CallTrait.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ trait CallTrait
1818
/**
1919
* Adds a method to call after service initialization.
2020
*
21-
* @param string $method The method name to call
22-
* @param array $arguments An array of arguments to pass to the method call
21+
* @param string $method The method name to call
22+
* @param array $arguments An array of arguments to pass to the method call
23+
* @param bool $returnsClone Whether the call returns the service instance or not
2324
*
2425
* @return $this
2526
*
2627
* @throws InvalidArgumentException on empty $method param
2728
*/
28-
final public function call(string $method, array $arguments = []): self
29+
final public function call(string $method, array $arguments = [], bool $returnsClone = false): self
2930
{
30-
$this->definition->addMethodCall($method, static::processValue($arguments, true));
31+
$this->definition->addMethodCall($method, static::processValue($arguments, true), $returnsClone);
3132

3233
return $this;
3334
}

0 commit comments

Comments
 (0)