Problem/Motivation
8.x-1.8 requires Drupal 11.3 or later, so sites still on Drupal 10 are stuck on 8.x-1.7. Embed is restoring Drupal 10 support on 8.x-1.x without dropping Drupal 12 in #3612600, and Entity Embed needs the same change to be installable on Drupal 10 again.
Proposed resolution
Require ^10.6 || ^11.3 || ^12: Drupal 10.6 and 11.3 are the oldest minors that still get security fixes, and the ones CI tests. Sites on older minors can keep using 8.x-1.7. To support Drupal 10:
- Add
#[LegacyHook]functions to the module's and test modules'.modulefiles that call the hook classes, and register the hook classes in*.services.ymlfor Drupal 10. - Add
template_preprocess_entity_embed_container()for core before 11.2, which ignores the theme hook's "initial preprocess" callback. - Restore the
@ContentEntityTypeannotation onEntityEmbedFakeEntitynext to its attribute, which core only reads from 11.1. - Add PHPUnit annotations next to the test attributes, for Drupal 10's PHPUnit 9.
- Expect the node search view modes in
EntityReferenceFieldFormatterTestbefore Drupal 11.4, which moved them to Search (#3587564). - Turn the previous major CI jobs back on.
Remaining tasks
- Release Embed 8.x-1.13 with #3612600: Entity Embed requires
drupal/embed: ^1.12, and 8.x-1.12 requires Drupal 11.3, so the previous major job can't pass until then. - Review the MR.
AI disclosure
Generated with the help of an LLM. Claude Code found what Drupal 10 lacks and wrote the shims and annotations; I decided to keep Drupal 12 while restoring Drupal 10, reviewed the changes, and ran the tests, phpcs and phpstan locally on Drupal 11.4.
Issue fork entity_embed-3643887
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dave reidComment #5
dave reid