Skip to content
Snippets Groups Projects

Support @> as a shorthand for !service_closure in YamlFileLoader

1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
@@ -528,6 +528,11 @@ private function resolveServices(mixed $value): mixed
//return new Expression(substr($value, 2));
throw new InvalidArgumentException(sprintf("'%s' is an Expression, but expressions are not supported.", $value));
} elseif (is_string($value) && str_starts_with($value, '@')) {
if (str_starts_with($value, '@>')) {
$argument = $this->resolveServices(substr_replace($value, '', 1, 1), $file, $isParameter);
return new ServiceClosureArgument($argument);
}
if (str_starts_with($value, '@@')) {
$value = substr($value, 1);
$invalidBehavior = null;
Loading