Problem/Motivation

The Workbench Moderation module cannot be installed at D10. This project is unlikely to become compatible with D10 as Core Content Moderation is now the preferred way to control moderation workflows.

Proposed resolution

Scheduler needs to maintain its integration with Workbench Moderation, and the tests should be run with Core 9.x versions, but do not need to run when testing with Drupal 10.

Remaining tasks

  1. Cater for allowing workbench moderation to be unavailable by removing it from require-dev in composer.json
  2. Get workbench moderation conditionally if not running tests on Drupal 10
  3. Skip or avoid running the workbench tests if the module is not installed (or if running on D10+)

Issue fork scheduler-3314267

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Status: Active » Needs review

Task 1 is done as in the changes form the parent issue.

Task 2 is achieved in drupalci.yml by adding

drush status | awk "NR==1{print \$2\$3\$4}" | grep version:9 && sudo -u www-data composer require drupal/workbench_moderation:* drupal/workbench_moderation_actions:*

This will get the two modules when matching 'version:9' but not get them when running on drupal 10

Task 3 is done by removing the $modules definition in the test, and checking \Drupal::service('extension.list.module')->getList(). Thanks to @vishalkhode for that idea.

jonathan1055’s picture

StatusFileSize
new3.26 KB

As a final check before committing, here's a patch with the actual intended changes for this issue.

  • jonathan1055 committed c2ad4e1 on 2.x
    Issue #3314267 by jonathan1055, vishalkhode: Workbench Moderation tests...

jonathan1055’s picture

Status: Needs review » Fixed

This worked out OK in the end. Thanks @vishalkhode for the initial idea.
Committed directly, and closed the MR.

Status: Fixed » Closed (fixed)

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