Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!11217
Support @> as a shorthand for !service_closure in YamlFileLoader
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Support @> as a shorthand for !service_closure in YamlFileLoader
issue/drupal-3498038:3498038-support-service-closure
into
11.x
Overview
0
Commits
1
Pipelines
1
Changes
1
Open
ghost of drupal past
requested to merge
issue/drupal-3498038:3498038-support-service-closure
into
11.x
2 months ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Closes
#3498038
0
0
Merge request reports
Compare
11.x
11.x (HEAD)
and
latest version
latest version
041b31c9
1 commit,
2 months ago
1 file
+
5
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
+
5
−
0
Options
@@ -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