Problem/Motivation

Since #3643887, 8.x-1.x supports Drupal 10.6, 11.3 and 12. Drupal 11.5 and later report "Code in entity_embed.module is deprecated in drupal:11.5.0 and must be converted before drupal:13.0.0" (change record), so the phpunit (next major) job fails. Core reports it because two functions in entity_embed.module have no #[LegacyHook]:

  • template_preprocess_entity_embed_container(), which only core before 11.2 calls.
  • entity_embed_ckeditor4to5upgrade_plugin_info_alter(), which only does anything on Drupal 10: Drupal 11 has no CKEditor 4 to 5 upgrade plugin type.

Proposed resolution

Add core's #[ExtensionFileIsConverted] attribute to the first function in entity_embed.module. It's meant for modules that support older cores, as long as the module works without the file on 11.3 and later, which these two functions meet. Older cores ignore the attribute, and phpstan.neon needs an ignoreErrors entry for its missing class on 10.6 and 11.3. Remove the attribute along with the file's other code once the module requires Drupal 11.3.

Remaining tasks

  • Add the attribute and the phpstan ignore.
  • Check that the phpunit (next major) job passes.

AI disclosure

Generated with the help of an LLM. Claude Code found the deprecation in the Drupal 12 job's log, traced it to core's HookCollectorPass, and drafted this issue. I decided to handle it in a follow-up and reviewed the summary.

Comments

dave reid created an issue. See original summary.

dave reid’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
dave reid’s picture

Version: 2.0.x-dev » 8.x-1.x-dev