Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2024 at 09:12 UTC
Updated:
4 Mar 2026 at 21:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
longwaveNow we can support tags in YAML parsing it would be good to add support for
!service_closurein services.yml as per https://symfony.com/doc/current/service_container/service_closures.html - it is also doable by switching to autowiring but good to have both options and be more like Symfony.Comment #3
longwaveLooking at the code actually I think this should just use
#[AutowireIterator]as per https://symfony.com/doc/current/service_container/service_subscribers_lo...This gives you a collection of services that are lazily instantiated and that you can iterate over, which is exactly what we need in
::validateUninstall().Comment #5
longwaveStill needs work to clean up the now-unused proxy classes but BookUninstallTest passes locally so let's see what happens.
Comment #6
longwaveAlso wondering why the ModuleInstaller itself is lazy, it's not injected into anything?
edit: it is injected into some forms and the ConfigImporter, but we probably will need it there anyway, not sure it is worth being lazy just for that - doesn't seem like critical path.
Comment #7
longwaveOptimizedPhpArrayDumper is not capable of restoring iterators, it just converts them to arrays, and the services within are not lazily instantiated.
Comment #8
longwaveOptimizedPhpArrayDumper can now dump and restore lazy service iterators and the unused proxy classes have been deleted.
Comment #9
longwave#2961380: Support IteratorArgument in \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::dumpValue added IteratorArgument to OptimizedPhpArrayDumper but it turns out the implementation was incomplete as the iterators were no longer lazy and just cast to arrays in the restored container, however this is currently otherwise unused in core so I think it's OK to fix here.
Comment #10
needs-review-queue-bot commentedThe 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.
Comment #11
longwaveComment #12
longwaveComment #13
longwaveComment #14
longwaveComment #15
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. 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.
Comment #16
longwaveRebased, also added a test that was added over in #3414208: Add support for tagged_iterator to YamlFileLoader
Comment #17
smustgrave commentedMay need a rebase, but appears to have a unit test failure.
Comment #19
longwaveFixed unit test, thanks @kim.pepper for the fix over in #3414208: Add support for tagged_iterator to YamlFileLoader
Comment #20
longwaveRebased following #3414208: Add support for tagged_iterator to YamlFileLoader
Comment #21
longwaveAdded BC service for the
$uninstallValidatorsargument to ModuleInstaller, probably should add a test for that, and also add back theaddUninstallValidator()method and issue a deprecation as well just in case.Comment #22
longwavemglaman/phpstan-drupaldoesn't like YAML tags, opened https://github.com/mglaman/phpstan-drupal/pull/743Comment #23
kim.pepper#22 The fix was just tagged by @mglaman in a new release https://github.com/mglaman/phpstan-drupal/releases/tag/1.2.10
Comment #24
spokje#3437778: Bump phpstan/phpstan and mglaman/phpstan-drupal to latest probably needs to land to make this MR work.
Comment #25
longwavePHPStan update landed, updated the baseline to include the new deprecation for the BC layer.
Comment #26
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. 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.
Comment #27
longwaveRebased following book and forum removals.
Comment #28
smustgrave commentedMR appears to need manual rebase again
Comment #29
kim.pepperRebased on 11.x
Comment #30
kim.pepperHiding some files.
Comment #31
spokjeIdea is nice, code looks fine, tests are green.
The only thing that I wonder about if there's still time to deprecate/remove in 10.3.0/11.0.0 since the BETAs of both are already out.
I _think_ we're too late and need to deprecate/remove in 10.3.1/12.0.0, but am not sure
I know I've seen documentation on this before somewhere, but my search-fu is failing me now.
Putting this on RTBC so core committers can decide on this.
Comment #33
catchThis should be deprecated in 11.1 for 12.0.0 at this point. We're probably going to have to deprecate some things in 10.4 for removal in 12.0.0 too at some point, but there's no new API for contrib to implement here so it should be fine in 11.1 as cleanup without affecting contrib compatibility with both major branches. Just needs versions changed in the deprecation messages so went ahead and made/applied suggestions to the MR.
Comment #34
spokjeThanks @catch.
Since there's not yet a version-tag for 11.1.x in the dropdown (nor Git), I think the correct status for this issue would be postponed and we whack a [11.1.x] in the title to have some kind of visual queue?
Comment #35
catch@Spokje because there's the 11.0.x branch open, we can commit 11.1.x-specific stuff to 11.x now. Then we'll eventually branch 11.1.x off 11.x when we want to start committing 11.2.x-specific stuff.
Comment #36
spokje@catch: Ah, of course, this eludes me every once in a while. Thanks for explaining.
Moving to correct version.
Comment #39
catchCommitted/pushed to 11.x, thanks!
Comment #41
mikelutzShould this not be removed in 12.0.0?
Comment #43
mikelutzComment #44
alexpottFixed the deprecation notice - thanks @mikelutz