catch (ParameterNotFoundException
$e) { if (!
$parameter->
isDefaultValueAvailable()) { throw new AutowiringFailedException($this->currentId,
$e->
getMessage(), 0,
$e);
} $arguments[$index] =
clone $this->defaultArgument;
$arguments[$index]->value =
$parameter->
getDefaultValue();
continue 2;
} if ($attribute instanceof AutowireCallable
) { $value =
$attribute->
buildDefinition($value,
$type,
$parameter);
} elseif ($lazy =
$attribute->lazy
) { $definition =
(new Definition($type)) ->
setFactory('current'
) ->
setArguments([[$value ??=
$getValue()]]) ->
setLazy(true
);
if (!\
is_array($lazy)) { if (str_contains($type, '|'
)) { throw new AutowiringFailedException($this->currentId,
sprintf('Cannot use #[Autowire] with option "lazy: true" on union types for service "%s"; set the option to the interface(s) that should be proxied instead.',
$this->currentId
));
} $lazy =
str_contains($type, '&'
) ?
explode('&',
$type) :
[];
}