Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 46ddb5b

Browse filesBrowse files
committed
Fix CR issues
1 parent d1a1877 commit 46ddb5b
Copy full SHA for 46ddb5b

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/DependencyInjection/Attribute/AutowireCallable.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Attribute/AutowireCallable.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.