Using the Drupal Lenient Composer Plugin
The Drupal Lenient Composer Plugin makes it possible for composer to allow the download of Drupal extensions that are not compatible with the current version of Drupal core. This is necessary when when testing a contributed project with a new major version of Drupal core. The lenient plugin does this by ignoring the version constraints for the extension.
The Drupal Lenient Composer Plugin should not be used in production.
The following shows how to install and configure the plugin. Included is further instructions for allowing Drupal to install the extension and to apply patches.
Install and configure the plugin
Install
composer require mglaman/composer-drupal-lenient
There may be prompts to allow plugins. For these enter 'y' to accept.
Allow download of extensions individually
Let the lenient plugin know of all the projects to allow.
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/project-to-allow"]'
Allow download of all extension
To allow all packages
composer config --json extra.drupal-lenient.allow-all true
Allow installation of extensions
Drupal core will prevent the installation of extensions that are not version compatible. To allow the extensions to be install use the Backward Compatibility module.
Install
composer require drupal/backwards_compatibilty
of
Manually add the latest Drupal core version to the core_version_requirement line in the extension *.info.yml file.
core_version_requirement: ^9.3 || ^10 || ^11 || ^XX
Apply patches
If there are patches to install, use the Composer Patches Plugin.
Note: when using DrupalPod, first run ddev ssh before the composer config command above.
Former lenient Composer endpoint
Drupal.org offered a second composer repository endpoint: https://packages.drupal.org/lenient which is no longer available.
If your composer.json contains the following in the repositories section, it can safely be removed.
"lenient": {
"type": "composer",
"url": "https://packages.drupal.org/lenient"
},Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion