Hello everyone,

Currently, I am encountering dependency issues while trying to upgrade the Drupal core to version 9. I have been following the steps from this page, by using the upgrade_status module, I have upgraded all modules that are compatible with Drupal 8. Only the modules that require Drupal 9 remain. I plan to upgrade them after I successfully upgrade the Drupal core.

And the commands I ran for upgrading Drupal core were:

composer require 'drupal/core-recommended:^9' 'drupal/core-composer-scaffold:^9' 'drupal/core-project-message:^9' --update-with-dependencies --no-update

composer update

However, I encountered the following error. I have tried modifying the corresponding package versions in the composer.json, but I still run into similar errors:

yucheng@yucheng:/var/www/ameb_composer$ composer update
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/context_active_trail ^3.0, found drupal/context_active_trail[dev-1.x, dev-2.x, 1.0.0-rc1, 1.0.0-rc2, 1.x-dev (alias of dev-1.x), 2.0.0-rc2, ..., 2.x-dev (alias of dev-2.x)] but it does not match the constraint.
  Problem 2
    - Root composer.json requires drupal/field_time ^2.0, found drupal/field_time[dev-1.0.x, 1.0.0-alpha1, ..., 1.0.x-dev (alias of dev-1.0.x)] but it does not match the constraint.
  Problem 3
    - Root composer.json requires drupal/scheduler ^3.0, found drupal/scheduler[dev-1.x, dev-2.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x), 2.0.0-alpha1, ..., 2.x-dev (alias of dev-2.x)] but it does not match the constraint.
  Problem 4
    - Root composer.json requires drupal/time_range ^3.0, found drupal/time_range[dev-1.x, 1.0.0, 1.1.0, 1.2.0, 1.x-dev (alias of dev-1.x), 2.0.1, 8.1.3, 9.0.0, 9.0.1, 9.0.2, 9.0.3] but it does not match the constraint.
  Problem 5
    - Root composer.json requires drupal/cms_content_sync ^3.0 -> satisfiable by drupal/cms_content_sync[3.0.0-beta1, ..., 3.0.x-dev].
    - drupal/cms_content_sync[3.0.0-beta1, ..., 3.0.x-dev] require php >=8.0.0 -> your php version (7.4.33) does not satisfy that requirement.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Here is my composer.json:

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal 8 projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^2.2",
        "drupal/backup_migrate": "^5.1",
        "drupal/captcha": "^1.5",
        "drupal/ckeditor_entity_link": "^1.4",
        "drupal/ckeditor_responsive_plugin": "^2.1",
        "drupal/cms_content_sync": "^3.0",
        "drupal/context_active_trail": "^3.0",
        "drupal/core": "9.5.11",
        "drupal/core-composer-scaffold": "^9",
        "drupal/core-project-message": "^9",
        "drupal/core-recommended": "^9",
        "drupal/ctools": "^3.9",
        "drupal/entity_reference_revisions": "^1.12",
        "drupal/feeds": "^3.0",
        "drupal/field_time": "^2.0",
        "drupal/paragraphs": "^1.14",
        "drupal/scheduler": "^3.0",
        "drupal/search_exclude": "^3.0",
        "drupal/simple_megamenu": "^2.0",
        "drupal/time_range": "^3.0",
        "drupal/upgrade_status": "^3.18",
        "drupal/views_data_export": "^2.0",
        "drupal/views_infinite_scroll": "^1.9",
        "drupal/viewsreference": "^2.0",
        "edge-box/sync-core": "^3.2.29"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "composer/installers": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true
        }
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:drupal-library"
            ],
            "web/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "web/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "web/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "web/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/8/install",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        }
    },
    "require-dev": {
        "drupal/core-dev": "^9"
    }
}

Below is my current system information:

  • Ubuntu 24.04

  • composer: version 2.8.8 2025-04-04 16:56:46

  • PHP 7.4.33 (cli) (built: Dec 24 2024 07:12:16) (NTS)

  • Apache 2

  • MySQL 8.4.0

  • Drupal: 8.9.20

I would greatly appreciate it if you could offer any solutions or directions to look into. Thank you very much!