Skip to content
Snippets Groups Projects
Commit 041b31c9 authored by ghost of drupal past's avatar ghost of drupal past
Browse files

Support @> as a shorthand for !service_closure in YamlFileLoader

parent b2205aff
No related branches found
No related tags found
1 merge request!11217Support @> as a shorthand for !service_closure in YamlFileLoader
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment