Bug fix: resolved a PHPStan static analysis error where casting a mixed-typed block_id
configuration value directly to string was not permitted. An is_scalar() guard is now used to
narrow the type before casting. No behavior change.
Bug fix: resolved a PHPStan type error where block_content entity IDs read from component configuration were typed as mixed, causing a static analysis failure. The value is now explicitly cast to string before being passed to EntityStorageBase::load(). No behavior change.
Fix PHPStan type errors in hook_preprocess_block(): add explicit is_array() and is_string() guards so nested array offset access is properly type-narrowed.
Declare drupal:block_content as an explicit module dependency; the module imports BlockContentInterface from that module and must require it.
Fix block usage tracking for copied inline blocks: the cloned entity's ID is now written to the component configuration, ensuring orphan cleanup targets the copy and not the original.
Adds a "Copy block" action to the Layout Builder block contextual menu. Copied blocks are fully independent — editing a copy never affects the original.
- Deep clone: creates a new independent block_content entity per copy
- Copies the current state of the block, not the original revision
- No contrib dependencies beyond Drupal core Layout Builder
- Requires Drupal 10.3+ or Drupal 11
Adds a "Copy block" action to the Layout Builder contextual menu. Copied blocks are fully independent — editing a copy never affects the original block.
Key features:
- Deep clone: creates a new independent block_content entity
- Copies the current state of the block, not the original revision
- No contrib dependencies — requires only Drupal core Layout Builder
- Requires Drupal 10.3+ or Drupal 11