Closed (fixed)
Project:
Drupal core
Version:
10.2.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2023 at 10:34 UTC
Updated:
7 Dec 2023 at 15:09 UTC
Jump to comment: Most recent
In #3392616: Update to Symfony 6.4 we decided to convert both BookNavigationCacheContext and MenuActiveTrailsCacheContext to use lazy services.
This issue was created to do just that.
Currently both classes are container aware, so not to load an expensive service when not needed.
- Change \Drupal\book\BookManager and \Drupal\Core\Menu\MenuActiveTrail to laze loading services.
- Remove container awareness from BookNavigationCacheContext and MenuActiveTrailsCacheContext
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
spokjePostponing on the possible adoption of native Symfony lazy services in #3396928: Deprecate Drupal ProxyBuilder in favor of Symfony lazy services .
Comment #3
spokje#3396928: Deprecate Drupal ProxyBuilder in favor of Symfony lazy services is trickier than expected, let's not postpone better on perfect here.
Comment #4
spokjeComment #6
spokjeComment #7
spokjeComment #8
spokjeComment #9
smustgrave commentedPipeline is green and CR has the main points.
Almost marked because the syntax in the generated classes seemed off but checking others guess that's the case of how they get generated. And gitlabCI didn't complain.
If this gets in should the scope of #3396928: Deprecate Drupal ProxyBuilder in favor of Symfony lazy services be expanded?
Comment #10
spokjeComment #13
catchCommitted/pushed to 11.x and cherry-picked to 10.2.x, thanks!
Comment #15
spokjePublished CR.
Comment #16
hephaestus commentedThis change appears to be causing the issue discussed in #3403778: MenuActiveTrail ($menu_link_manager) must be of type Menu\MenuLinkManagerInterface, DependencyInjection\Container given after upgrading to 10.2.0-beta1.