Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  send the recipient phone number as an array
  [DependencyInjection] Fix ternary in AutowireCallable attribute
  fix test
  Fix CS
  [Messenger] Added postgres asset filter integration test
  [AssetMapper] fix npm version constraint conversion
  • Loading branch information
derrabus committed Jun 20, 2024
2 parents cd4f777 + 85cfebb commit 45d2bb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Attribute/AutowireCallable.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(

public function buildDefinition(mixed $value, ?string $type, \ReflectionParameter $parameter): Definition
{
return (new Definition($type = \is_string($this->lazy) ? $this->lazy : ($type ?: 'Closure')))
return (new Definition($type = \is_array($this->lazy) ? current($this->lazy) : ($type ?: 'Closure')))
->setFactory(['Closure', 'fromCallable'])
->setArguments([\is_array($value) ? $value + [1 => '__invoke'] : $value])
->setLazy($this->lazy || 'Closure' !== $type && 'callable' !== (string) $parameter->getType());
Expand Down

0 comments on commit 45d2bb5

Please sign in to comment.