feat: #3597602 Add Drupal 12 support, require Drupal 11.3

Description

Adds Drupal 12 support to 8.x-1.x and requires Drupal 11.3. This combines the Drupal 12 work from !27 (closed) (Project Update Bot), !29 (closed) (#3612592 (closed)), !30 (closed) and !31 (closed) (#3612593 (closed)) into one MR, and supersedes !23 (closed).

Closes #3597602

  • core_version_requirement: ^11.3 || ^12, dropping Drupal 10 and 11.2.
  • New #[EmbedType] plugin attribute (Drupal\embed\Attribute\EmbedType). The @EmbedType annotation still works.
  • Request::get(), removed in Symfony 8, replaced in the preview controller and test controller.
  • Hooks and hook_requirements() moved to EmbedHooks and EmbedRequirements hook classes, and embed.module is removed (Drupal 11.5 deprecates code in .module files).
    • The procedural form validate callbacks are now static EmbedHooks methods.
  • Return types declared for Symfony's DebugClassLoader: native on EmbedSettingsForm, @return tags on EmbedTypeBase and EmbedButton, which other modules extend.
  • EmbedButton::calculateDependencies() returns $this, as its parent does, instead of the dependencies array or NULL.
  • The embed_button entity type and the test filter plugin use attributes.
  • Drupal 10 fallbacks removed (FileExists::Replace, renderInIsolation()).
  • Tests use PHPUnit attributes.
  • CI also tests the previous and next minor, the next major and max PHP, automatically on MRs and pushes. CSpell allows the project names in AGENTS.md.
  • AGENTS.md: 8.x-1.x is for backwards-compatible changes, 2.0.x for breaking ones such as removing CKEditor 4; lists known dependents.

Remaining tasks

AI disclosure

I used Claude Code (Opus 5.5) to combine the existing MRs, write the hook class and attribute conversions, and draft this description. I decided to combine the MRs, chose to drop Drupal 10 and require 11.3, reviewed the changes, and ran phpcs, phpstan and the full test suite locally.

🤖 Generated with Claude Code

Edited by Dave Reid

Merge request reports

Loading
Loading