- Issue created by @kim.pepper
- Merge request !6134Issue #3414208 Add support for tagged_iterator to YamlFileLoader β (Closed) created by kim.pepper
- Status changed to Needs review
10 months ago 5:24am 12 January 2024 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Copied most of the code from
\Symfony\Component\DependencyInjection\Loader\YamlFileLoader::resolveServices()
- Status changed to Needs work
10 months ago 5:51am 12 January 2024 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Looks like we need to add support to
\Drupal\Component\Serialization\YamlPecl::decode()
too π - π¬π§United Kingdom alexpott πͺπΊπ
We need to add a callback to \Drupal\Component\Serialization\YamlPecl::decode() to process the tag to make it work the same way for PECL Yaml. And we'll need to add a tests to \Drupal\Tests\Component\Serialization\YamlPeclTest and \Drupal\Tests\Component\Serialization\YamlTest to ensure Symfony and PECL work the same.
- π¬π§United Kingdom longwave UK
Let's expand the scope of π Support Yaml::PARSE_CUSTOM_TAGS in \Drupal\Component\Serial::decodeization\YamlSymfony:: Needs work to do that?
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Related issue: π Always use YamlSymfony for loading service yaml files Needs review
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Postponed on:
- Status changed to Postponed
10 months ago 10:02pm 15 January 2024 - Status changed to Needs work
9 months ago 11:57am 4 March 2024 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
AFAICT all this still needs is test coverage + a change record?
- Status changed to Needs review
8 months ago 11:45pm 8 March 2024 - π¬π§United Kingdom longwave UK
This is just reusing Symfony code so not sure what tests we should add. Might be better just to start using it for real?
Opened MR!6980 to show how this could be used to simplify ThemeNegotiator; we can use it to replace many things that use the
service_collector
tag. - π¬π§United Kingdom longwave UK
@kim.pepper think also this might need additional support in OptimizedPhpArrayDumper so the iterators are dumped and restored properly?
- Status changed to Needs work
8 months ago 12:27am 9 March 2024 The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
#15 @longwave I could be missing something, but I believe we did that already in π Support IteratorArgument in \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::dumpValue RTBC
- π¬π§United Kingdom longwave UK
@kim.pepper see #3432595-9: Use a tagged service iterator for uninstall validators instead of individual lazy proxies β - I discovered there they are dumped correctly but restored as arrays of services instead of iterators which means they are no longer lazy - all services are instantiated when the service they are being injected into is instantiated.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I copied the relevant code block from
\Symfony\Component\DependencyInjection\Dumper\YamlDumper::dumpValue()
but not sure exactly what else I need to do. - π¬π§United Kingdom longwave UK
Symfony's YamlDumper is not compatible with our OptimizedPhpArrayDumper. Instead we should copy some of the changes from π Use a tagged service iterator for uninstall validators instead of individual lazy proxies Needs review over here.
- Status changed to Needs review
8 months ago 11:37am 26 March 2024 - π¬π§United Kingdom longwave UK
Ported the code from π Use a tagged service iterator for uninstall validators instead of individual lazy proxies Needs review and added additional test coverage to both YamlFileLoaderTest and ContainerTest.
- π¬π§United Kingdom longwave UK
Added CR: https://www.drupal.org/node/3436859 β
- Status changed to RTBC
8 months ago 11:30am 1 April 2024 - π¬π§United Kingdom alexpott πͺπΊπ
This looks great. Looking forward to not having to maintain our lazy service thing :)
- π¬π§United Kingdom alexpott πͺπΊπ
alexpott β changed the visibility of the branch 3414208-theme-negotiator-test to hidden.
- Status changed to Downport
8 months ago 5:39pm 1 April 2024 - π¬π§United Kingdom catch
Committed/pushed to 11.x, thanks!
This doesn't cherry-pick cleanly to 10.3.x, but I think it makes sense to backport if we can for parity?
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Published the CR
- Status changed to Needs review
8 months ago 9:06pm 1 April 2024 - π¬π§United Kingdom longwave UK
Rebased with
git rebase --onto origin/10.3.x origin/11.x
, fixed conflict in ContainerTest, and opened MR!7272 against 10.3.x. - Status changed to RTBC
8 months ago 11:06pm 1 April 2024 - Status changed to Fixed
8 months ago 10:37am 2 April 2024 Automatically closed - issue fixed for 2 weeks with no activity.