[#3587714] Reintroduce reusable blocks for the 9.1.3 migration window

Summary

Reverts the pre-release removal of reusable block support on 9.1.x. All reinstated code is marked deprecated targeting 9.2.0. The feature remains disabled by default (enable_reusable_blocks: false).

Changes

patternkit.install

  • patternkit_update_10308: Warn and continue (instead of throw) when a block plugin cannot be resolved.
  • patternkit_update_10309: No-op — defers field storage removal to 9.2.0.
  • patternkit_update_10310: Restores the reusable field storage on sites where the pre-release removal hook already dropped the column.

src/Hook/ReusableBlockHooks.php (new)

  • Implements hook_requirements() with guards for the missing-column and feature-enabled states.
  • Emits a REQUIREMENT_WARNING on /admin/reports/status when reusable blocks exist in the database and the feature is not intentionally enabled.

phpstan-baseline.neon — Intentional deprecation suppressions for reinstated deprecated code.

Testing

vendor/bin/phpunit tests/src/Kernel/ReusableBlocksUpdateHooksTest.php
vendor/bin/phpunit tests/src/Kernel/ReusableBlockHooksRequirementsTest.php

On a site at schema 10309 (pre-release column drop):

  1. Confirm patternkit_field_data.reusable column is absent.
  2. Run drush updb -y — expect patternkit_update_10310 to fire and restore the column.
  3. Visit /admin/reports/status with existing reusable blocks — expect a deprecation warning.

Closes #3587714

Merge request reports

Loading