Problem/Motivation
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.
Steps to reproduce
Proposed resolution
- Change \Drupal\book\BookManager
and \Drupal\Core\Menu\MenuActiveTrail
to laze loading services.
- Remove container awareness from BookNavigationCacheContext
and MenuActiveTrailsCacheContext