diff -u b/src/EventSubscriber/CurrentUserContext.php b/src/EventSubscriber/CurrentUserContext.php --- b/src/EventSubscriber/CurrentUserContext.php +++ b/src/EventSubscriber/CurrentUserContext.php @@ -2,13 +2,8 @@ namespace Drupal\page_manager\EventSubscriber; -use Drupal\Core\Cache\CacheableMetadata; -use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Session\AccountInterface; -use Drupal\page_manager\Context\ContextDefinitionFactory; +use Drupal\Core\Plugin\Context\LazyContextRepository; use Drupal\page_manager\Event\PageManagerContextEvent; -use Drupal\Core\Plugin\Context\Context; -use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\page_manager\Event\PageManagerEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -30,7 +25,7 @@ * @param \Drupal\Core\Plugin\Context\ContextRepositoryInterface $context_repository * The context repository service. */ - public function __construct(ContextRepositoryInterface $context_repository) { + public function __construct(LazyContextRepository $context_repository) { $this->contextRepository = $context_repository; }