BlockLibraryController typehints LazyContextRepository, not the interface

Created on 14 November 2024, 6 months ago

Problem/Motivation

When decorating LazyContextRepository, block module throws:

Uncaught PHP Exception TypeError: "Drupal\block\Controller\BlockLibraryController::__construct(): Argument #2 ($context_repository) must be of type Drupal\Core\Plugin\Context\LazyContextRepository, Drupal\page_manager\SubRequestAccess\CoreFix\LazyContextRepository given, called in web/core/modules/block/src/Controller/BlockLibraryController.php on line 72" at web/core/modules/block/src/Controller/BlockLibraryController.php line 61

Proposed resolution

Typehint the interface.

Remaining tasks

Code, review, commit.

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

---

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

block.module

Created by

πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024