Composer Plugin Adds Constraint Overrides for Drupal Module Compatibility
Version 2.0.0 of composer-drupal-lenient introduces new capabilities for analysing and bypassing version restrictions that can block module installation. The Composer plugin is used to relax dependency constraints in Drupal projects.
The update adds support for Composer commands such as why-not and prohibits. These commands help developers identify constraint conflicts. The release also introduces a Drupal runtime hook that bypasses core_version_requirement checks during installation. In a LinkedIn post, Matt Glaman highlighted these additions.
The plugin addresses cases where contributed modules are technically compatible with newer Drupal versions but remain blocked by declared constraints. By relaxing these constraints, developers can install modules and apply patches. This allows compatibility to be tested without modifying upstream package metadata.
Additional updates include improvements to testing and workflow integration. The project now uses PHPUnit-based coverage for PrePoolCreateEvent. It also includes fixes related to Composer’s security features. The release adds a license file and includes contributions from new contributors, including automated changes generated through GitHub Copilot.
The plugin operates through an allowlist model. Developers can specify which packages bypass strict constraints. This provides controlled flexibility during dependency resolution. It is particularly useful during major Drupal version upgrades.


