- Issue created by @kim.pepper
- Merge request !8208#3450516 Add support for !service_closure custom tag in YamlFileLoader β (Open) created by kim.pepper
- Status changed to Needs review
6 months ago 5:57am 29 May 2024 - Status changed to RTBC
6 months ago 10:09pm 29 May 2024 - πΊπΈUnited States smustgrave
Change seems simple enough
1) Drupal\Tests\Core\DependencyInjection\YamlFileLoaderTest::testParseDefinitionsWithProvider Failed asserting that an object is an instance of class Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument. /builds/issue/drupal-3450516/core/tests/Drupal/Tests/Core/DependencyInjection/YamlFileLoaderTest.php:74 FAILURES! Tests: 15, Assertions: 38, Failures: 1.
Test-only failure shows also has coverage.
Solution matches what's proposed so believe this is good.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Updated IS with more background
- π¬π§United Kingdom alexpott πͺπΊπ
We should have a CR for this... something like [#3436859]
- Status changed to Needs work
6 months ago 1:08pm 1 June 2024 - Status changed to RTBC
6 months ago 12:35am 2 June 2024 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Added a change record.
-
alexpott β
committed 72397df3 on 11.x
Issue #3450516 by kim.pepper: Add support for !service_closure custom...
-
alexpott β
committed 72397df3 on 11.x
- Status changed to Fixed
6 months ago 11:20am 2 June 2024 - π¬π§United Kingdom alexpott πͺπΊπ
Committed 72397df and pushed to 11.x. Thanks!
diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php index cbf282b181..39c4a771f5 100644 --- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php +++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php @@ -494,9 +494,9 @@ private function resolveServices(mixed $value): mixed return $argument; } - if ('service_closure' === $value->getTag()) { - return new ServiceClosureArgument($this->resolveServices($argument)); - } + if ($value->getTag() === 'service_closure') { + return new ServiceClosureArgument($this->resolveServices($argument)); + } } if (is_array($value)) {
Fixed coding standards to comply with Symfony's and the rest of the file... spaces and yoda ifs...
Going to discuss with release managers about which releases this belongs in.
-
alexpott β
committed 03dbcdc7 on 10.4.x
Issue #3450516 by kim.pepper: Add support for !service_closure custom...
-
alexpott β
committed 03dbcdc7 on 10.4.x
- π¬π§United Kingdom alexpott πͺπΊπ
Discussed with @catch we agreed to put in 10.4.x - and possibly 10.3 and 11.0 - will discuss some more.
-
alexpott β
committed 3552c87a on 10.3.x
Issue #3450516 by kim.pepper: Add support for !service_closure custom...
-
alexpott β
committed 3552c87a on 10.3.x
-
alexpott β
committed 231fafe5 on 11.0.x
Issue #3450516 by kim.pepper: Add support for !service_closure custom...
-
alexpott β
committed 231fafe5 on 11.0.x
- π¬π§United Kingdom alexpott πͺπΊπ
Discussed with @longwave and we agreed to backport this to 10.3.x
Automatically closed - issue fixed for 2 weeks with no activity.