- Issue created by @Anybody
- Merge request !18Move drupal/rules from require to require-dev for tests → (Merged) created by Anybody
- Status changed to RTBC
3 months ago 9:15am 20 September 2024
While rules was moved into a submodule and dependency should be optional, the 4.x version added rules to the composer.json
Module page says:
Branch 4.x: Drupal 11 compatible. Using Rules version 4.0.0 or greater is recommended if you use the Rules integration that is now under "Role Expire Rules" submodule.
And upgrading to ^4 results in:
composer why drupal/rules
drupal/role_expire 4.0.1 requires drupal/rules (*)
Typically, you don't want this additional dependency, if not using the submodule.
So I guess it was added to composer.json for tests and because own composer.json can't exist for submodules.
In such cases, it's best practice to place the optional / test dependency into require-dev.
I marked this as major bug, because upgrading currently leads to the unwanted dependency in composer and confuses upgraders. So I think it should be resolved ASAP.