Upgrade from 9.5.1 to 10 throws error on all dependencies

Created on 26 October 2023, about 1 year ago
Updated 20 November 2023, 12 months ago

The endgoal is to upgrade from Drupal 9.5.1 to Drupal 10.

I ran the following commands:
composer require drupal/core:^10 drupal/core-composer-scaffold:^10 drupal/core-project-message:^10 drupal/core-recommended:^10 --no-install --no-update

composer update "drupal/core*"

I am using upgrade status module, and according to the dashboard, all contributed modules are compatible, but I get the following result after running composer update

Problem 1
    - Root composer.json requires drupal/core ^10, found drupal/core[10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - acquia/blt is locked to version 13.7.3 and an update of this package was not requested.
    - acquia/blt 13.7.3 requires drupal/core ^9.0.0-alpha1 || ^10.0.0-alpha1 -> found drupal/core[9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 3
    - acquia/drupal-spec-tool is locked to version v5.0.0 and an update of this package was not requested.
    - acquia/drupal-spec-tool v5.0.0 requires drupal/core ^9.0 -> found drupal/core[9.0.0-alpha1, ..., 9.5.x-dev] but it conflicts with your root composer.json require (^10).
  Problem 4
    - drupal/acquia_connector is locked to version 4.0.5 and an update of this package was not requested.
    - drupal/acquia_connector 4.0.5 requires drupal/core >=8.9 <11.0.0-stable -> found drupal/core[8.9.0-beta1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 5
    - drupal/acquia_purge is locked to version 1.3.0 and an update of this package was not requested.
    - drupal/acquia_purge 1.3.0 requires drupal/core ^9.2 || ^10 -> found drupal/core[9.2.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 6
    - drupal/acquia_search is locked to version 3.1.10 and an update of this package was not requested.
    - drupal/acquia_search 3.1.10 requires drupal/core >=8.9 <11 -> found drupal/core[8.9.0-beta1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 7
    - drupal/admin_toolbar is locked to version 3.4.2 and an update of this package was not requested.
    - drupal/admin_toolbar 3.4.2 requires drupal/core ^9.2 || ^10 -> found drupal/core[9.2.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 8
    - drupal/admin_toolbar_tools is locked to version 2.5.0 and an update of this package was not requested.
    - drupal/admin_toolbar_tools 2.5.0 requires drupal/core ^8.8.0 || ^9.0 -> found drupal/core[8.8.0-alpha1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but it conflicts with your root composer.json require (^10).
  Problem 9
    - drupal/asset_injector is locked to version 2.19.0 and an update of this package was not requested.
    - drupal/asset_injector 2.19.0 requires drupal/core ^9.3 || ^10.0 -> found drupal/core[9.3.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 10
    - drupal/autologout is locked to version 1.4.0 and an update of this package was not requested.
    - drupal/autologout 1.4.0 requires drupal/core ^9.2 || ^10 -> found drupal/core[9.2.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 11
    - drupal/ckeditor_accordion is locked to version 2.0.3 and an update of this package was not requested.
    - drupal/ckeditor_accordion 2.0.3 requires drupal/core ^9.4 || ^10 -> found drupal/core[9.4.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 12
    - drupal/clientside_validation is locked to version 4.0.2 and an update of this package was not requested.
    - drupal/clientside_validation 4.0.2 requires drupal/core ^9.4 || ^10.0 -> found drupal/core[9.4.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.
  Problem 13
    - drupal/clientside_validation_jquery is locked to version 4.0.2 and an update of this package was not requested.
    - drupal/clientside_validation_jquery 4.0.2 requires drupal/core ^9.4 || ^10 -> found drupal/core[9.4.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.2.x-dev] but these were not loaded, likely because it conflicts with another require.

and the list goes up to problem 94

My composer.json looks like this

{
    "name": "acquia/blt-project",
    "type": "project",
    "description": "Project template for Drupal 8 sites built with BLT.",
    "license": "GPL-2.0-only",
    "require": {
        "php": ">=8.1",
        "ext-curl": "*",
        "acquia/blt": "^13",
        "acquia/drupal-spec-tool": "*",
        "acquia/memcache-settings": "*",
        "composer/installers": "@stable",
        "consolidation/robo": "@stable",
        "cweagans/composer-patches": "@stable",
        "drupal/acquia_connector": "^4.0",
        "drupal/acquia_purge": "^1.1",
        "drupal/acquia_search": "^3.1",
        "drupal/admin_toolbar": "^3.2",
        "drupal/admin_toolbar_tools": "^2.0",
        "drupal/asset_injector": "^2.7",
        "drupal/autologout": "^1.4",
        "drupal/ckeditor_accordion": "^2.0",
        "drupal/clientside_validation": "^4.0",
        "drupal/clientside_validation_jquery": "^4.0",
        "drupal/codemirror_editor": "^1.7",
        "drupal/color_field": "^3.0",
        "drupal/conditional_fields": "^4.0@alpha",
        "drupal/config_filter": "^2.4",
        "drupal/config_split": "^2.0@RC",
        "drupal/console": "~1.0",
        "drupal/core": "^10",
        "drupal/core-composer-scaffold": "^10",
        "drupal/core-project-message": "^10",
        "drupal/core-recommended": "^10",
        "drupal/css_editor": "^2.0.1",
        "drupal/ctools": "^4.0",
        "drupal/devel": "^5.1",
        "drupal/devel_entity_updates": "^4.1",
        "drupal/draggableviews": "^2.1",
        "drupal/dropzonejs": "^2.7",
        "drupal/dynamic_entity_reference": "^4.0@alpha",
        "drupal/email_tfa": "^1.0",
        "drupal/entity_browser": "^2.7",
        "drupal/entity_clone": "^2.0@beta",
        "drupal/entity_embed": "^1.3",
        "drupal/entityqueue": "^1.0@beta",
        "drupal/fast_404": "^2.0@alpha",
        "drupal/feeds": "^3.0@alpha",
        "drupal/feeds_ex": "^1.0@alpha",
        "drupal/feeds_tamper": "^2.0@beta",
        "drupal/field_css": "^2.0@RC",
        "drupal/field_group": "3.x-dev@dev",
        "drupal/filefield_paths": "^1.0",
        "drupal/flexible_permissions": "^1.0",
        "drupal/force_password_change": "^2.0.0",
        "drupal/group": "^3.1",
        "drupal/groupmedia": "^4.0@alpha",
        "drupal/imce": "^3.0",
        "drupal/inline_entity_form": "^1.0@RC",
        "drupal/layout_builder_component_attributes": "^2.0.1",
        "drupal/layout_builder_modal": "^1.1",
        "drupal/layout_builder_restrictions": "^2.16",
        "drupal/layout_builder_styles": "^2.0",
        "drupal/layout_library": "^1.0@beta",
        "drupal/ldap_auth": "^1.25.0",
        "drupal/lightning_core": "^6.0",
        "drupal/lightning_media": "^5.0",
        "drupal/maxlength": "^2.1",
        "drupal/media_directories": "^2.1@beta",
        "drupal/media_entity_file_replace": "^1.1",
        "drupal/memcache": "^2.3",
        "drupal/menu_delete": "^2.2",
        "drupal/menu_export": "^1.3",
        "drupal/menu_item_extras": "^3.0",
        "drupal/metatag": "^2.0",
        "drupal/mini_layouts": "^1.0@alpha",
        "drupal/module_filter": "^4.0",
        "drupal/multiple_fields_remove_button": "^2.2",
        "drupal/n1ed": "^2.57",
        "drupal/node_export": "^1.0@alpha",
        "drupal/openapi_jsonapi": "^3.0",
        "drupal/openapi_rest": "^2.0",
        "drupal/openapi_ui": "^1.0",
        "drupal/openapi_ui_redoc": "^1.0@RC",
        "drupal/openapi_ui_swagger": "^1.0@RC",
        "drupal/paragraphs": "^1.12",
        "drupal/pathauto": "^1.6",
        "drupal/purge": "^3.5@RC",
        "drupal/rat": "^1.0",
        "drupal/readonly_field_widget": "^1.3",
        "drupal/rest_menu_items": "^3.0.2",
        "drupal/restui": "^1.17",
        "drupal/scheduled_transitions": "^2.3@RC",
        "drupal/schema_metatag": "^3.0",
        "drupal/seckit": "^2.0",
        "drupal/single_content_sync": "^1.3",
        "drupal/smtp": "^1.0",
        "drupal/structure_sync": "^2.0",
        "drupal/svg_image": "^3.0",
        "drupal/svg_image_field": "^2.1.1",
        "drupal/tablefield": "^2.3",
        "drupal/telephone_validation": "^2.4",
        "drupal/thunder_admin": "^4.0",
        "drupal/tome": "^1.11",
        "drupal/twig_debugger": "^1.1",
        "drupal/unique_content_field_validation": "^1.0",
        "drupal/upgrade_status": "^4.0",
        "drupal/view_unpublished": "^1.0@alpha",
        "drupal/views_infinite_scroll": "^2.0",
        "drupal/webform": "^6.2@RC",
        "drupal/webform_rest": "^4.0",
        "drush/drush": "@stable",
        "enyo/dropzone": "^5.7",
        "firebase/php-jwt": "^6.8",
        "league/oauth2-client": "^2.6",
        "php-amqplib/php-amqplib": "^3.5",
        "phpstan/phpstan": "^1.4.8",
        "sebbmeyer/php-microsoft-teams-connector": "^0.2.2",
        "shuchkin/simplexlsx": "^1.0",
        "wikimedia/composer-merge-plugin": "^v2.0.0"
    },
    "require-dev": {
        "geerlingguy/drupal-vm": "~5.0",
        "palantirnet/drupal-rector": "^0.15.1"
    },
    "config": {
        "platform": {
            "php": "8.1"
        },
        "sort-packages": true,
        "allow-plugins": {
            "wikimedia/composer-merge-plugin": false,
            "composer/installers": true,
            "grasmash/drupal-security-warning": true,
            "cweagans/composer-patches": true,
            "drupal/core-composer-scaffold": true,
            "oomphinc/composer-installers-extender": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
            "acquia/blt": true,
            "drupal/console-extend-plugin": true,
            "drupal/core-project-message": true
        }
    },
    "extra": {
        "composer-exit-on-patch-failure": true,
        "drupal-scaffold": {
            "locations": {
                "web-root": "./docroot"
            },
            "initial": {
                "sites/default/default.services.yml": "sites/default/services.yml",
                "sites/default/default.settings.php": "sites/default/settings.php"
            },
            "file-mapping": {
                "[web-root]/.htaccess": false
            }
        },
        "enable-patching": true,
        "installer-paths": {
            "docroot/core": [
                "type:drupal-core"
            ],
            "docroot/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "docroot/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "docroot/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "docroot/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "docroot/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "docroot/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ],
            "docroot/libraries/{$name}": [
                "type:drupal-library",
                "type:bower-asset",
                "type:npm-asset",
                "swagger-api/swagger-ui"
            ],
            "drush/Commands/{$name}": [
                "type:drupal-drush"
            ]
        },
        "installer-types": [
            "bower-asset",
            "npm-asset"
        ],
        "patchLevel": {
            "drupal/core": "-p2"
        },
        "patches": {
            "drupal/core": {
                "https://www.drupal.org/project/drupal/issues/3265147": "https://www.drupal.org/files/issues/2022-09-27/dynamic_page_cache-do_not_mark_anonymous_requests_as_uncacheable-3265147-7.patch"
            },
            "drupal/group": {
                "#3104345-13": "https://www.drupal.org/files/issues/2023-04-28/group-entity_create_access_missing_group_context-3104345-13.patch"
            },
            "drupal/webform_user_registration": {
                "#4 rector fix": "https://www.drupal.org/files/issues/2022-12-24/webform_user_registration.1.x-dev.rector.patch"
            }, 
            "drupal/field_css": {
                "#6 https://www.drupal.org/project/field_css/issues/3287500": "https://www.drupal.org/files/issues/2022-12-24/field_css.2.0.x-dev.rector.patch"
            }
        }
    },
    "autoload": {
        "psr-4": {
            "Example\\": "blt/src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Drupal\\Tests\\PHPUnit\\": "tests/phpunit/src/"
        }
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        },
        {
            "type": "package",
            "package": {
                "name": "enyo/dropzone",
                "version": "5.7.1",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/enyo/dropzone/archive/v5.7.1.zip",
                    "type": "zip"
                }
            }
        }
    ],
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-create-project-cmd": [
            "blt internal:create-project:init-repo"
        ],
        "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
        "nuke": [
            "rm -rf vendor composer.lock docroot/core docroot/modules/contrib docroot/profiles/contrib docroot/themes/contrib",
            "@composer clearcache --ansi",
            "@composer install --ansi"
        ]
    }
}

What could be the issue?

💬 Support request
Status

Closed: outdated

Version

9.5

Component
Composer 

Last updated about 12 hours ago

No maintainer
Created by

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

Comments & Activities

  • Issue created by @sidney.desousa
  • 🇮🇳India dineshkumarbollu

    Hi @sidney.desousa

    In composer.json file try to edit the "minimum-stability": "dev" to "minimum-stability": "stable" if your using this site for production build.
    try to run composer why-not drupal/module to see which dependencies are causing the conflict.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Try asking in the composer channel in slack

    See drupal.org/slack for how to join

    Also running this might give better output

    composer why-not drupal/core 10 -t

  • 🇬🇧United Kingdom longwave UK

    At least two of the issues here are:

        - acquia/drupal-spec-tool v5.0.0 requires drupal/core ^9.0 -> found drupal/core[9.0.0-alpha1, ..., 9.5.x-dev] but it conflicts with your root composer.json require (^10).
    
        - drupal/admin_toolbar_tools 2.5.0 requires drupal/core ^8.8.0 || ^9.0 -> found drupal/core[8.8.0-alpha1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but it conflicts with your root composer.json require (^10).
    

    The versions of these modules are for Drupal 9 so Composer is refusing to update to Drupal 10.

  • Status changed to Postponed: needs info about 1 year ago
  • I agree, the command output usually tells you what is wrong. You must read it in full.

  • I spent some time debugging, here is what happens.

    #3 I ran composer why-not drupal/core 10 -t and below is the result:

    ├──acquia/blt-project dev-main (requires drupal/core ^9.5)
    ├──acquia/drupal-spec-tool v5.0.0 (requires drupal/core ^9.0)
    │  └──acquia/blt-project dev-main (requires acquia/drupal-spec-tool *)
    ├──drupal/admin_toolbar_tools 2.5.0 (requires drupal/core ^8.8.0 || ^9.0)
    │  └──acquia/blt-project dev-main (requires drupal/admin_toolbar_tools ^2.0)
    ├──drupal/core-recommended 9.5.11 (requires drupal/core 9.5.11)
    │  └──acquia/blt-project dev-main (requires drupal/core-recommended ^9.5)
    ├──drupal/field_css 2.0.0-rc4 (requires drupal/core ^8.8.4 || ^9)
    │  └──acquia/blt-project dev-main (requires drupal/field_css ^2.0@RC)
    ├──drupal/core 10.0.0 (requires symfony/console ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/console but v4.4.49 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/dependency-injection ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/dependency-injection but v4.4.49 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/event-dispatcher ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/event-dispatcher but v4.4.44 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/http-foundation ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/http-foundation but v4.4.49 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/http-kernel ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/http-kernel but v4.4.50 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/mime ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/mime but v5.4.13 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/routing ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/routing but v4.4.44 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/serializer ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/serializer but v4.4.47 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/validator ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/validator but v4.4.48 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/process ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/process but v4.4.44 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires symfony/yaml ^6.2) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require symfony/yaml but v4.4.45 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires twig/twig ^3.4.3) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require twig/twig but v2.15.5 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires guzzlehttp/guzzle ^7.5) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require guzzlehttp/guzzle but 6.5.8 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires guzzlehttp/psr7 ^2.4) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require guzzlehttp/psr7 but 1.9.1 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires asm89/stack-cors ^2.1) (circular dependency aborted here)
    ├──acquia/blt-project dev-main (does not require asm89/stack-cors but 1.3.0 is installed) (circular dependency aborted here)
    ├──drupal/core 10.0.0 (requires psr/log ^3.0) (circular dependency aborted here)
    └──acquia/blt-project dev-main (does not require psr/log but 1.1.4 is installed) (circular dependency aborted here)

    The very first line is tricky

    acquia/blt-project dev-main (requires drupal/core ^9.5)

    This is not a dependency, but the project itself if I understand correctly.

    Then I tried resolving each dependency:

    The drupal/admin_toolbar_tools does not seem to be a contributed module listed on drupal.org, and it requires Drupal 9 in its dependencies list when I look at the composer.lock file.

    Am not sure about the drupal/core-recommended one

    For the field_css module, I already applied a patch which handles the compatibility issue, but for some reason it still gives a problem to move to Drupal 10. See patch below:

    https://www.drupal.org/files/issues/2022-12-24/field_css.2.0.x-dev.rector.patch

  • I think you are free to edit the "name" attribute to be the custom name of your project if that makes the output easier to parse.

  • The solution to my problem was to remove all the composer packages except the Drupal core ones.

    After that I re-ran

    composer require drupal/core:^10 drupal/core-composer-scaffold:^10 drupal/core-project-message:^10 drupal/core-recommended:^10 --no-install --no-update

    composer update -W

    From here on, I re-introduced all the dependencies.

  • Status changed to Closed: outdated 12 months ago
Production build 0.71.5 2024