Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add service provider, try to influence Drupal runtime parsing of core_version_requirement #14

Open
mglaman opened this issue May 4, 2023 · 7 comments · May be fixed by #32
Open

Add service provider, try to influence Drupal runtime parsing of core_version_requirement #14

mglaman opened this issue May 4, 2023 · 7 comments · May be fixed by #32

Comments

@mglaman
Copy link
Owner

mglaman commented May 4, 2023

No description provided.

@weitzman
Copy link

Folks who need this might want to try https://www.drupal.org/project/backward_compatibility

@mglaman
Copy link
Owner Author

mglaman commented Dec 7, 2023

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.

@alexpott
Copy link

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.

@alexpott
Copy link

FWIW this is something that hopefully hooks as PHP Attributes will allow us to solve nicely.

claudiu-cristea added a commit to claudiu-cristea/composer-drupal-lenient that referenced this issue Jul 10, 2024
@claudiu-cristea claudiu-cristea linked a pull request Jul 10, 2024 that will close this issue
@gitressa
Copy link
Contributor

Until (or if) this becomes possible, perhaps we could link to https://www.drupal.org/project/backward_compatibility in the README, since composer require and drush install go hand in hand?

@mglaman
Copy link
Owner Author

mglaman commented Nov 23, 2024

Drupal now uses OOP hooks. So I think this can be done now for 11.x!

@gitressa
Copy link
Contributor

Fantastic! It would be awesome if all that's needed to bypass version constraints for both Composer (download) and Drush/GUI (install) is Drupal Lenient Composer Plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants