Cannot install Entity Clone 2.0.0 because this module requires ^1.0 in composer.json

Created on 9 June 2023, over 1 year ago
Updated 11 January 2024, 12 months ago

Problem/Motivation

Entity Clone 8.x-1.0-beta7 is now unsupported. I'm trying install the newest version (2.0.0-beta3 currently) but composer comes back with the following:
drupal/menu_link_clone 3.2.0 requires drupal/entity_clone ^1.0

Steps to reproduce

Run this composer command
composer require 'drupal/entity_clone:^2.0@beta'

Proposed resolution

If Menu Link Clone does work with the latest version of Entity Clone then changing the composer.json in this module to require version 2.0 should fix the problem.

πŸ’¬ Support request
Status

Active

Version

3.2

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States rprager

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

Comments & Activities

  • Issue created by @rprager
  • πŸ‡ΊπŸ‡ΈUnited States rprager
  • πŸ‡ΊπŸ‡ΈUnited States sixteen penny

    I am having the same issue.

  • First commit to issue fork.
  • @bryanmanalo opened merge request.
  • πŸ‡³πŸ‡±Netherlands seanB Netherlands

    You can hack around this by doing this in composer.json:
    "drupal/entity_clone": "2.0.0-beta4 as 1.0"

    It would be great to have this committed though, this is quite a nasty workaround.

  • πŸ‡«πŸ‡·France MacSim

    Successfully applying the patch provided in #4 didn't solved the issue on my side

    composer install
    Gathering patches for root package.
    Removing package drupal/menu_link_clone so that it can be re-installed and re-patched.
      - Removing drupal/menu_link_clone (3.2.0)
    Deleting web/modules/contrib/menu_link_clone - deleted
    > DrupalProject\composer\ScriptHandler::checkComposerVersion
    Installing dependencies from lock file (including require-dev)
    Verifying lock file contents can be installed on current platform.
    Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
    Package operations: 1 install, 0 updates, 0 removals
    Gathering patches for root package.
    Gathering patches for dependencies. This might take a minute.
      - Installing drupal/menu_link_clone (3.2.0): Extracting archive
      - Applying patches for drupal/menu_link_clone
        https://www.drupal.org/files/issues/2023-08-09/menu_link_clone_3365946-4.patch (Cannot install Entity Clone 2.0.0)
    Generating autoload files
    63 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    > DrupalProject\composer\ScriptHandler::createRequiredFiles
    
    composer require 'drupal/entity_clone:^2.0@beta'
    ./composer.json has been updated
    Running composer update drupal/entity_clone
    Gathering patches for root package.
    > DrupalProject\composer\ScriptHandler::checkComposerVersion
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires drupal/entity_clone ^2.0@beta, found drupal/entity_clone[2.0.0-beta2, 2.0.0-beta3, 2.0.0-beta4] but these were not loaded, likely because it conflicts with another require.
      Problem 2
        - drupal/menu_link_clone is locked to version 3.2.0 and an update of this package was not requested.
        - drupal/menu_link_clone 3.2.0 requires drupal/entity_clone ^1.0 -> found drupal/entity_clone[1.0.0-beta1, ..., 1.0.0-beta7] but it conflicts with your root composer.json require (^2.0@beta).
    
    Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
    
    Installation failed, reverting ./composer.json and ./composer.lock to their original content.
    
    
Production build 0.71.5 2024