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' .module files that call the hook classes, and register the hook classes in *.services.yml for Drupal 10.
  • Add template_preprocess_entity_embed_container() for core before 11.2, which ignores the theme hook's "initial preprocess" callback.
  • Restore the @ContentEntityType annotation on EntityEmbedFakeEntity next 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 EntityReferenceFieldFormatterTest before 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.

Command icon 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

dave reid created an issue. See original summary.

dave reid’s picture

Issue summary: View changes

  • dave reid committed 0b898798 on 8.x-1.x
    feat: #3643887 Restore Drupal 10 support
    
    By: dave reid
    
dave reid’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.