Problem/Motivation

After running composer update, nicebooks/isbn was upgraded from 0.6.4 to 0.7.1

Now when running a database update, the following error occurs:

The ISBN module requires the nicebooks/isbn library. Install the library with
the command composer require nicebooks/isbn or if you cannot use composer,
you can install it using the Ludwig module [1].

[1] https://www.drupal.org/project/ludwig

It looks like in the project composer, the requirement is causing this error:

"require": {
    "nicebooks/isbn": "~0.0"
},

Gemini response to the above:

The maintainers of the nicebooks/isbn library explicitly state in their documentation:

"When a breaking change is introduced, a new 0.x version cycle is always started. It is therefore safe to lock your project to a given release cycle, such as 0.6.*."

Because the Drupal module used ~0.0 instead of something safer like ^0.6 or ~0.6.0, your project automatically pulled in 0.7.1 when you ran composer update. The 0.7.x branch of nicebooks/isbn introduced breaking structural changes (and raised the minimum PHP requirement to 8.2), which the Drupal module's code simply isn't written to handle yet.

Proposed resolution

Update the requirement of nicebooks/isbn

"require": {
    "nicebooks/isbn": "^0.6 || ^0.7"
}

Issue fork isbn-3576767

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

karengrey created an issue. See original summary.

megachriz’s picture

It looks like there is more needed than a change in composer.json. Most tests now fail with the message "The ISBN module requires the nicebooks/isbn library".

megachriz’s picture

Assigned: Unassigned » megachriz

Maybe only supporting ISBN < 0.7 would work. I'll try that.

megachriz’s picture

Category: Support request » Bug report
Status: Active » Fixed

Tests are passing. I merged the code! Thanks for helping fixing this issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • megachriz committed 2126fc2d on 8.x-1.x authored by karengrey
    fix: #3576767 Updated composer requirement for nicebooks/isbn, use a...
megachriz’s picture

I've added a follow-up for adding support for nicebooks/isbn v0.7: #3576931: Add support for nicebooks/isbn 0.7

megachriz’s picture

karengrey’s picture

Thanks @megachriz

Status: Fixed » Closed (fixed)

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