[#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 thereusablefield 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_WARNINGon/admin/reports/statuswhen 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.phpOn a site at schema 10309 (pre-release column drop):
- Confirm
patternkit_field_data.reusablecolumn is absent. - Run
drush updb -y— expectpatternkit_update_10310to fire and restore the column. - Visit
/admin/reports/statuswith existing reusable blocks — expect a deprecation warning.
Closes #3587714