Scheduler's composer.json has

"require-dev": {
...
        "drupal/rules": "^3",

to allow us to run the Scheduler Rules Integration tests. However the Rules module does not yet have a D9 compatible version, so this is stopping Scheduler from being able to run tests at Drupal 9.x

Update

Until Rules is 9.x compatible, the requirements on Rules have been removed from the latest Scheduler -dev. This allows Scheduler to be 9.x compatible and for tests to be run at 9.0 and 9.1

Scheduler release 8.x-1.3 does not have the above changes, and the Rules requirements remain in, because the release is primarily aimed at actual users running 8.x. If you want to use Scheduler on a Drupal 9 site, you can either download the latest -dev version, or patch 8.x-1.3 with patch #20. Please report here any difficulties and I will try to help.

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

Here's an idea, to not require-dev "drupal/rules": "^3" and skip the tests if running at D9.
Not sure this will work at D8, but worth trying.

Status: Needs review » Needs work

The last submitted patch, 2: 3136553-2.no-rules-in-d9.patch, failed testing. View results

jonathan1055’s picture

The D9 composer failure is because it is being loaded before the patch has chance to take effect. To get round this we'll have to commit the change to remove drupal/rules, the could use a patch in drupalci.yml to add it back in if not running D9. It would mean that local testing using the compoer.json file would not get the Rules module, but chances are the local environment would already have Rules, or the developer would know and manually add it.

It's worth a try, can always back out if it's a poor idea.

  • jonathan1055 committed 0765788 on 8.x-1.x
    Issue #3136553 by jonathan1055: Remove require-dev drupal/rules to allow...
jonathan1055’s picture

Before, in the D9 branch test we had

--- Commands Executed ---
sudo -u www-data /usr/local/bin/composer  require --no-interaction 'drupal/coder:^8.3.3' 'drupal/devel_generate:^2.0' 'drupal/rules:^3' 'drush/drush:^9.0' --prefer-stable --no-progress --no-suggest --working-dir /var/www/html
Return Code: 2

With this commit we have

--- Commands Executed ---
sudo -u www-data /usr/local/bin/composer  require --no-interaction 'drupal/coder:^8.3.3' 'drupal/devel_generate:^2.0' 'drupal/rules:*' 'drush/drush:^9.0' --prefer-stable --no-progress --no-suggest --working-dir /var/www/html
Return Code: 2

Rules is still being required, but now drupal/rules:* instead of drupal/rules:^3

Is this due to the scheduler_rules_integration module, which has "drupal/rules": "^3.x" or maybe it is because scheduler.info.yml has

 test_dependencies:
  - devel:devel_generate
  - rules:rules

  • jonathan1055 committed 3439491 on 8.x-1.x
    Issue #3136553 by jonathan1055: Remove test_dependencies rules:rules...

  • jonathan1055 committed 64eff9e on 8.x-1.x
    Issue #3136553 by jonathan1055: Remove require rules from...
jonathan1055’s picture

We had the same branch composer failure. Now after removing from sub-module too, we get a failure on devel_generate. The 2.x branch is not D9 compatible, but the latest 3.x-dev is.

  • jonathan1055 committed e0cc9f2 on 8.x-1.x
    Issue #3136553 by jonathan1055: Change to require drupal/devel_generate...

  • jonathan1055 committed d8622dc on 8.x-1.x
    Issue #3136553 by jonathan1055: Change to require drupal/devel_generate...
jonathan1055’s picture

Allow devel_generate 2.0 or 3.x-dev, and allow drush 9.0 or 10.0

  • jonathan1055 committed adb851f on 8.x-1.x
    Issue #3136553 by jonathan1055: Allow devel_generate 2.0 or 3.x-dev, and...

  • jonathan1055 committed 7b60538 on 8.x-1.x
    Issue #3136553 by jonathan1055: Skip rules tests if the module has not...
jonathan1055’s picture

That's better. The composer conflicts are sorted and D9 tests now actually start, and so do the D8 tests. Need to skip the Rules test classes as in the commit above.

jonathan1055’s picture

Status: Needs work » Fixed
Parent issue: » #3136831: [meta] Drupal9 Readiness and compatibility - Scheduler
StatusFileSize
new4.2 KB

For the future, here is a patch which restores the Rules requirements and testing. This can be used when Rules has a D9-compatible version, or when there is an alternative way to use Rules in D8 but not in D9.

jonathan1055’s picture

Status: Fixed » Needs work
jonathan1055’s picture

Status: Needs work » Fixed

Stale form data.

  • jonathan1055 committed 584c1c9 on 8.x-1.x
    Issue #3136553 by jonathan1055: Restore use of Rules for 8.x-1.2 release
    
jonathan1055’s picture

StatusFileSize
new4.2 KB

Here's a single patch to remove the Rules requirements, to allow testing at D9

jonathan1055’s picture

Cannot test this patch at D9, but it is exactly the same as the multiple commits done previously on this thread, so it will run OK on D9 when committed. This will allow the 'Test on commit' for D9 to run again.

  • jonathan1055 committed 0cc835e on 8.x-1.x
    Issue #3136553 by jonathan1055: Remove Rules testing to allow 9.x tests...
jonathan1055’s picture

Status: Fixed » Active

This should remain as an active issue until Rules has a 9.x version we can use in our 9.x testing.

  • jonathan1055 committed a39d6a0 on 8.x-1.x
    Issue #3136553 by jonathan1055: Remove requirement for Rules to allow...
jonathan1055’s picture

Issue summary: View changes

Updated summary to explain how to use Scheduler 8.x-1.3 with Drupal 9

jonathan1055’s picture

Status: Active » Needs review
Related issues: +#3162076: [meta] D9 compatibility, +#3162077: Update dependencies for D9
StatusFileSize
new4.29 KB

Rules is now compatible at Core 9.x so we can restore the requirements and tests.

Status: Needs review » Needs work

The last submitted patch, 26: 3136553-26.restore-rules-tests.patch, failed testing. View results

jonathan1055’s picture

Status: Needs work » Needs review

No that I have fixed the missed deprecations in the ActionsTest on #3097919-17: Deprecations: Replace non-boolean use of assertTrue() and assertFalse() we should get better results.

  • jonathan1055 committed 52f2b07 on 8.x-1.x
    Issue #3136553 by jonathan1055: Restore Rules tests
    
jonathan1055’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.