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.

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

CommentFileSizeAuthor
#4 ultimate_cron-3488161.patch1.31 KBredwan jamous
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

redwan jamous created an issue. See original summary.

redwan jamous’s picture

Assigned: redwan jamous » Unassigned
Status: Active » Needs review

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 .

redwan jamous’s picture

StatusFileSize
new1.31 KB

Uploading a static patch file to use with composer-patches...

berdir’s picture

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.

redwan jamous’s picture

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.

berdir’s picture

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.

  • berdir committed 3365c9a0 on 8.x-2.x authored by redwan jamous
    Issue #3488161 by redwan jamous, peterwcm, prudloff: Ultimate cron is...

berdir credited peterwcm.

berdir credited prudloff.

berdir’s picture

Status: Needs review » Fixed

Didn't see anything in alpha8 that would be broken on D9, so merging. There was an existing issue doing the opposite #3469076: D9 sites are fetching 2.0.0-alpha8 when running composer update 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.

Status: Fixed » Closed (fixed)

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