Problem/Motivation
- The
block_content
module is a block factory. It creates blocks plugins by deriving over reusable Block Content entities (\Drupal\block_content\Entity\BlockContent
). - The
block
module mainly offers block placement functionality.
Normally, block_content.module
should not need block.module
in order to function properly. The blocks produced by block_content
can be placed on page by Layout Builder, Display Suite, Panels and even... (core) Block module.
But there are some dependencies on block.module
exposed in block_content.module
:
- The
administer blocks
permission. - The
block.admin_display
route. - Unnecessarily installing block in tests
- Redirects for insert/update with BlockContent entity form
- Delete form and delete hook
- ...anything else?
But, I think the above, dependencies were just a compromise, inherited from earlier Drupal versions. I see them only polluting the intra-module relationships by an unneeded dependency.
Proposed resolution
Now that we have decoupled block_content from the block library, I believe we can remove dependency
To be discussed...
- Move
block.admin_display
route in core? - Believe this is no longer needed - What about the shared permission? - Believe this is no longer needed
Remaining tasks
- Review outline in #3206952-22: Remove block.module dependency from block_content
- Review proposed MR
User interface changes
None
API changes
Move appropriate customisations to Block or Block Content modules.
Add accommodations to testing in Block Content that relies on block placement to avoid block.module
Data model changes
None
Release notes snippet
@todo