0

I'm currently on Drupal Version 9.5.10, and I cannot update to Drupal 10 due to some depdendancy conflicts.

I updated my database, cleared cache, ran a cron. It doesn't fix.

How can I upgrade to Drupal 10 ? I am currently on Drupal 9.5.10

[root@vlstage22 master]# 
[root@vlstage22 master]# composer require drupal/core-recommended:10.1.1 drupal/core-composer-scaffold:10.1.1 drupal/core-project-message:10.1.1 -W --ignore-platform-reqs
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? 
./composer.json has been updated
Running composer update drupal/core-recommended drupal/core-composer-scaffold drupal/core-project-message --with-all-dependencies
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/core-recommended 10.1.1 -> satisfiable by drupal/core-recommended[10.1.1].
    - drupal/core-recommended 10.1.1 requires drupal/core 10.1.1 -> found drupal/core[10.1.1] but these were not loaded, likely because it conflicts with another require.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.
[root@vlstage22 master]#

composer.json file

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal 9 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": {
        "php": "^7.3||^8.0",
        "composer/installers": "^1.9",
        "drupal/admin_toolbar": "^3.4",
        "drupal/api": "^2.0@RC",
        "drupal/auto_entitylabel": "^3.0",
        "drupal/bootstrap": "^3.29",
        "drupal/core-composer-scaffold": "^10.0",
        "drupal/core-project-message": "^10.0",
        "drupal/core-recommended": "^10.0",
        "drupal/ctools": "^4.0",
        "drupal/devel": "^5.1",
        "drupal/diff": "^1.1",
        "drupal/encrypt": "^3.1",
        "drupal/entityreference_filter": "^1.4",
        "drupal/flood_control": "^2.3",
        "drupal/fpa": "^4.0",
        "drupal/masquerade": "^2.0@RC",
        "drupal/module_filter": "^4.0",
        "drupal/pathauto": "^1.11",
        "drupal/queue_ui": "^3.1",
        "drupal/search_api": "^1.29",
        "drupal/superfish": "^1.6",
        "drupal/token": "^1.12",
        "drupal/views_bulk_operations": "^4.2",
        "drupal/watchdog_prune": "^2.3",
        "drush/drush": "^11.6",
        "php-imap/php-imap": "^2.0",
        "symfony/finder": "^6.1"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "stable",
    "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/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "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"
            ]
        }
    }
}

2 Answers 2

0

I have taken this file and ran the same command. The full output is:

composer require drupal/core-recommended:10.1.1 drupal/core-composer-scaffold:10.1.1 drupal/core-project-message:10.1.1 -W --ignore-platform-reqs
./composer.json has been updated
Running composer update drupal/core-recommended drupal/core-composer-scaffold drupal/core-project-message --with-all-dependencies
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/core-recommended 10.1.1 -> satisfiable by drupal/core-recommended[10.1.1].
    - Root composer.json requires drupal/entityreference_filter ^1.4 -> satisfiable by drupal/entityreference_filter[1.4.0].
    - drupal/entityreference_filter 1.4.0 requires drupal/core ^8 || ^9 -> satisfiable by drupal/core[8.0.0, ..., 8.9.20, 9.0.0, ..., 9.5.10].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0, ..., 8.9.20, 9.0.0, ..., 9.5.10, 10.0.0, ..., 10.1.2].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.7.0, ..., 8.9.20, 9.0.0, ..., 9.5.10, 10.0.0, ..., 10.1.2].
    - drush/drush 11.6.0 conflicts with drupal/core 9.1.15.
    ...
    - drupal/core-recommended 10.1.1 requires drupal/core 10.1.1 -> satisfiable by drupal/core[10.1.1].
    - Root composer.json requires drush/drush ^11.6 -> satisfiable by drush/drush[11.6.0].

So the issue is:

drupal/entityreference_filter 1.4.0 requires drupal/core ^8 || ^9

drupal/entityreference_filter is not compatible with Drupal 10. You must remove it or use the beta version:

composer require drupal/core-recommended:10.1.1 drupal/core-composer-scaffold:10.1.1 drupal/core-project-message:10.1.1 'drupal/entityreference_filter:^2.0@beta'  -W --ignore-platform-reqs
11
  • Also I noticed your Composer command output is different than mine. You should upgrade Composer to the latest version.
    – cilefen
    Aug 2 at 17:41
  • Problem 1 - Root composer.json requires drupal/core-recommended 10.1.1 -> satisfiable by drupal/core-recommended[10.1.1]. - drupal/core-recommended 10.1.1 requires psr/log ~3.0.0 -> found psr/log[3.0.0] but these were not loaded, likely because it conflicts with another require. Installation failed, reverting ./composer.json and ./composer.lock to their original content.
    – Ali Rizvi
    Aug 3 at 10:08
  • I do not know what you are trying to communicate with that comment.
    – cilefen
    Aug 3 at 10:13
  • i tried this composer require drupal/core-recommended:10.1.1 drupal/core-composer-scaffold:10.1.1 drupal/core-project-message:10.1.1 'drupal/entityreference_filter:^2.0@beta' -W --ignore-platform-reqs
    – Ali Rizvi
    Aug 3 at 10:14
  • but it gives this error Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires drupal/core-recommended 10.1.1 -> satisfiable by drupal/core-recommended[10.1.1]. - drupal/core-recommended 10.1.1 requires psr/log ~3.0.0 -> found psr/log[3.0.0] but these were not loaded, likely because it conflicts with another require.
    – Ali Rizvi
    Aug 3 at 10:14
1

Looks like the command you are running is composer require... that's incorrect you need to run composer update. Please see the docs they are very clear and easy to follow https://www.drupal.org/docs/updating-drupal/updating-drupal-core-via-composer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.