Remove optional rules (+typed_data) dependency from composer.json

Created on 20 September 2024, about 2 months ago

Problem/Motivation

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.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

RTBC

Version

4.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024