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@EmbedTypeannotation still works. Request::get(), removed in Symfony 8, replaced in the preview controller and test controller.- Hooks and
hook_requirements()moved toEmbedHooksandEmbedRequirementshook classes, andembed.moduleis removed (Drupal 11.5 deprecates code in.modulefiles).- The procedural form validate callbacks are now static
EmbedHooksmethods.
- The procedural form validate callbacks are now static
- Return types declared for Symfony's DebugClassLoader: native on
EmbedSettingsForm,@returntags onEmbedTypeBaseandEmbedButton, which other modules extend. EmbedButton::calculateDependencies()returns$this, as its parent does, instead of the dependencies array orNULL.- The
embed_buttonentity 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
-
Add contributors from #3612592 (closed), #3612593 (closed), !23 (closed) and !30 (closed) (mark_fullmer, podarok, RajabNatshah) to this issue's contribution record.
-
Create the change record for the
#[EmbedType]attribute (8.x-1.12): https://www.drupal.org/node/3639275
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.