fix: #3627021 Accept BlockManagerInterface in PageBlockDisplayVariant constructor

Summary

PageBlockDisplayVariant::__construct() type-hinted the concrete BlockManager. Modules that decorate plugin.manager.block (e.g. Drupal Canvas) pass a BlockManagerInterface that doesn't extend it, so every Block page variant fataled with a TypeError. This changes the type hint to BlockManagerInterface, matching the CTools parent.

The unit test now mocks BlockManagerInterface, so it covers this case. Without the fix, the test fails with the reported TypeError.

AI disclosure

Claude Code was used to draft this description; reviewed and tested by a human.

Testing

  • Enable page_manager_ui, add a page with a Block page variant, visit it → 200
  • Enable a module that decorates plugin.manager.block (e.g. Canvas) → page returns 500 with the TypeError
  • Apply this MR, drush cr
  • The page returns 200 and renders its blocks
  • The page edit screen and the variant's Content screen load
  • Add variant → Block page → Next reaches Configure variant
  • PageBlockDisplayVariantTest passes

Closes #3627021

Merge request reports

Loading
Loading