Open mglaman opened 1 year ago
Huh, so this is the magic.
/**
* Implements hook_system_info_alter().
*/
function backward_compatibility_system_info_alter(&$info, Extension $file, $type) {
$info['core_incompatible'] = FALSE;
}
Ah but it's invoked within the ExtensionList
which is impossible to decorate. https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Core/Extension/ExtensionList.php#L322
And it's a bit risky (maybe) to decorate the module handler and manually inject our own hook.
Another way would be to do a drush :) And add system_system_info_alter() in a file and include that file via composer. It does something similar with a log hook I think.
FWIW this is something that hopefully hooks as PHP Attributes will allow us to solve nicely.
Folks who need this might want to try https://www.drupal.org/project/backward_compatibility