Unresolved dependency Modifiers version >=8.x-1.0-alpha2 required

Created on 1 September 2023, over 1 year ago

Problem/Motivation

drush updb throws an error after upgrading via composer require 'drupal/look:^2.0'

Steps to reproduce

Have an old site with Modifiers and Look.
Upgrade both using composer
Run drush updb.
You should see the following:

gold@saturn:~/Projects/Citizen Gold/nz.from.citizengold (d9config)$ ddev drush updb
 [error]  Look requires this module and version. Currently using Modifiers version
 (Currently using Unresolved dependency Modifiers (Version >=8.x-1.0-alpha2 required)
)

For context, my source site is upgrading from Modifiers 8.x-1.4 and Look is old enough that there is no version in the look.info.yml file, however, the composer.lock suggests it is Look 8.x-1.3.

Proposed resolution

Update the dependency in look.info.yml from

dependencies:
  - modifiers:modifiers (>=8.x-1.0-alpha2)

to

dependencies:
  - modifiers:modifiers (^1.5)
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇳🇿New Zealand Gold 20 minutes in the future

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

Merge Requests

Comments & Activities

  • Issue created by @Gold
  • 🇳🇿New Zealand Gold 20 minutes in the future

    Actually, looking at other modules I don't think the version is needed.

  • Status changed to RTBC over 1 year ago
  • 🇳🇿New Zealand Gold 20 minutes in the future

    Adding the patch in MR!1 via cweagans/composer-patches does seem to do the job.

    gold@saturn:~/path/to/site $ ddev composer require 'drupal/look:^2.0'
    ./composer.json has been updated
    Running composer update drupal/look
    Gathering patches for root package.
    Removing package drupal/look so that it can be re-installed and re-patched.
      - Removing drupal/look (2.0.0)
    Deleting web/modules/contrib/look - deleted
    Loading composer repositories with package information
    Updating dependencies
    Nothing to modify in lock file
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
      - Syncing drupal/look (2.0.0) into cache
    Gathering patches for root package.
    Gathering patches for dependencies. This might take a minute.
      - Installing drupal/look (2.0.0): Cloning 2.0.0 from cache
      - Applying patches for drupal/look
        https://git.drupalcode.org/project/look/-/commit/653f272da67463af3c2113e28dd922502d8c4332.diff (Issue #3384743: Unresolved dependency Modifiers)
    
    Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
    Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
    Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
    Generating autoload files
    49 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    Info from https://repo.packagist.org: #StandWithUkraine
    No security vulnerability advisories found
    gold@saturn:~/path/to/site $ ddev drush updb
     [success] No pending updates.
  • Pipeline finished with Skipped
    3 months ago
    #307431
  • First commit to issue fork.
    • eleonel committed 6641e214 on 2.0.x authored by gold
      Issue #3384743: Unresolved dependency Modifiers version >=8.x-1.0-alpha2...
  • Status changed to Fixed 3 months ago
  • 🇯🇵Japan eleonel Itoshima 🇯🇵

    Thanks for your contribution.

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

Production build 0.71.5 2024