Ultimate cron is incompatible with Drupal 9

Created on 18 November 2024, 15 days ago

Problem/Motivation

Updating ultimate cron module on a Drupal 9 site then running drush updb will result in the following error:

 [error]   (Currently using Incompatible module The following module is installed, but it is incompatible with Drupal 9.5.11:
 * Ultimate Cron

Review the  suggestions for resolving this incompatibility [1] to repair your 
installation, and then re-run update.php.

This is because there's a core version requirement mismatch between ultimate_cron.info.yml and composer.json introduced by Issue #3435200: Automated Drupal 11 compatibility fixes for ultimate_cron 📌 Automated Drupal 11 compatibility fixes for ultimate_cron Fixed .

Composer will allow updating ultimate cron to 8.x-2.0-alpha8 on a Drupal 9 site while the info file has a different core version requirement.

Since I believe 8.x-2.0-alpha8 is still actually compatible with Drupal 9, we need to update the core_version_requirement in the info file to match what's in composer.json.
If I'm mistaken, and 8.x-2.0-alpha8 is incompatible with Drupal 9, then we need to do the opposite and update the required core version in composer.json.

Steps to reproduce

  1. With a Drupal 9 site.
  2. Update ultimate cron with composer.
  3. Notice how ultimate cron will be updated to 8.x-2.0-alpha8 without any issue.
  4. Run drush updb.
  5. Notice the error.

Proposed resolution

Match core version requirement in ultimate_cron.info.yml with what's in composer.json.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @RedwanJamous
  • Based on the changes in the below commit, I think the correct version requirement should be ^9.3 || ^10.1 || ^11.

    https://git.drupalcode.org/project/ultimate_cron/-/commit/c003090f0c7352...

    I also updated drush versions in composer.json based on Drupal X Drush compatibility table .

  • Pipeline finished with Success
    15 days ago
    Total: 538s
    #342224
  • Uploading a static patch file to use with composer-patches...

  • 🇨🇭Switzerland berdir Switzerland

    It's not possible change a release, so that can't be undone, we can do a new release, but there is no way to tell composer that alpha8 is actually Drupal 9 compatible.

    I assumed drupal.org overwrites the composer.json info but maybe not if it's already there. One option would be to just remove the line in composer.json.

    Let me know if this actually works for you then, or also just stick to alpha7, keep in mind that Drupal is EOL since 1 year now.

  • Thank you @berdir!

    I understand we cannot undo released changes, but I was thinking of doing a new release so that people who already faced this problem can resolve it by updating, and to ensure other Drupal 9 projects do not face this problem.

    We can remove the line from composer.json, it should work, but what about the change in the info file? will we keep Drupal 9 unsupported?

    We're trying our best to upgrade our project, but for some reasons we can't do it now, but thanks for mentioning it.

  • Pipeline finished with Success
    14 days ago
    Total: 405s
    #343024
  • 🇨🇭Switzerland berdir Switzerland

    If it really is still compatible with D9 then I'm open to doing a new release with that fixed, but will need to review the changes in alpha8 to see if that's really the case.

    > We're trying our best to upgrade our project, but for some reasons we can't do it now, but thanks for mentioning it.

    Yeah, I can understand that this can happen with some dependencies and so on. But then I'd be very, very careful with contrib updates and only update what you have to. Because the opposite of this issue is sooner or later going to cause bigger issues for you than this, you saw this immediately. But a module that claims to be D9 compatible and actually isn't anymore is going to be annoying.

  • Pipeline finished with Skipped
    9 days ago
    #348291
  • 🇨🇭Switzerland berdir Switzerland

    Didn't see anything in alpha8 that would be broken on D9, so merging. There was an existing issue doing the opposite 🐛 D9 sites are fetching 2.0.0-alpha8 when running composer update Needs review but the advantage is that this actually fixes composer and you can by default get a valid version.

    That said, #7 is still valid, if something breaks I'll just bump the min version, D9 isn't really supported anymore.

Production build 0.71.5 2024