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
-------
90ace51328
[DI] Add support for immutable setters in CallTrait
This commit is contained in:
commit
d294085689
@ -18,16 +18,17 @@ trait CallTrait
|
||||
/**
|
||||
* Adds a method to call after service initialization.
|
||||
*
|
||||
* @param string $method The method name to call
|
||||
* @param array $arguments An array of arguments to pass to the method call
|
||||
* @param string $method The method name to call
|
||||
* @param array $arguments An array of arguments to pass to the method call
|
||||
* @param bool $returnsClone Whether the call returns the service instance or not
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws InvalidArgumentException on empty $method param
|
||||
*/
|
||||
final public function call($method, array $arguments = [])
|
||||
final public function call($method, array $arguments = [], $returnsClone = false)
|
||||
{
|
||||
$this->definition->addMethodCall($method, static::processValue($arguments, true));
|
||||
$this->definition->addMethodCall($method, static::processValue($arguments, true), $returnsClone);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user