Closed
Description
Description
!service_closure '@foo'
is quite long winded.
@?foo
is already supported so why not @>
as well? It resembles fn () =>
so it's easy to remember.
Example
Implementing this as simple as
if ('service_closure' === $value->getTag() || (\is_string($argument) && str_starts_with($argument, '@>'))) {
if (is_string($argument)) {
$argument = str_replace('@>', '@', $argument);
}
$argument = $this->resolveServices($argument, $file, $isParameter);
return new ServiceClosureArgument($argument);
}