8000 bug #34923 [DI] Fix support for immutable setters in CallTrait (Lctrs) · symfony/symfony@d294085 · GitHub
[go: up one dir, main page]

Skip to content

Commit d294085

Browse files
bug #34923 [DI] Fix support for immutable setters in CallTrait (Lctrs)
This PR was merged into the 4.3 branch. Discussion ---------- [DI] Fix support for immutable setters in CallTrait | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | N/A Commits ------- 90ace51 [DI] Add support for immutable setters in CallTrait
2 parents ebadf51 + 90ace51 commit d294085

File tree

1 file changed

+5
-4
lines changed
  • src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits

1 file changed

+5
-4
lines changed

src/Symfony/Component/DependencyInjection/Loader/C 8000 onfigurator/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($method, array $arguments = [])
29+
final public function call($method, array $arguments = [], $returnsClone = false)
29< 5EB1 /code>30
{
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)
0