Similar to issue
3335486
💬
Unable to upgrade Drupal 9 to Drupal 10
Fixed
, I'm trying to upgrade from Drupal 9.5.7 to Drupal 10.0.7 but I'm getting a lot of errors in composer.
PHP 8.1.17
Composer 2.5.5
Commands:
composer require 'drupal/core-recommended:10.0.7' 'drupal/core-composer-scaffold:10.0.7' 'drupal/core-project-message:10.0.7' --update-with-dependencies --no-update
composer update -W --dry-run
Error Message:
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/console[1.0.0, ..., 1.9.4] require php ^5.5.9 || ^7.0 -> your php version (8.1.17) does not satisfy that requirement.
- symfony/expression-language[v4.0.0, ..., v4.4.8] require php ^7.1.3 -> your php version (8.1.17) does not satisfy that requirement.
- symfony/http-foundation[v4.0.0, ..., v4.4.8] require php ^7.1.3 -> your php version (8.1.17) does not satisfy that requirement.
- drupal/console-core 1.9.8 requires dflydev/dot-access-configuration ^1.0.4 -> found dflydev/dot-access-configuration[1.x-dev] but it does not match your minimum-stability.
- drupal/console[1.9.5, ..., 1.9.8] require symfony/http-foundation ~3.0|~4.0 -> satisfiable by symfony/http-foundation[v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.49].
- drupal/console 1.9.9 requires symfony/expression-language ~3.0|~4.0 -> satisfiable by symfony/expression-language[v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.47].
- You can only install one version of a package, so only one of these can be installed: symfony/http-foundation[v2.1.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.49, v5.0.0, ..., v5.4.22, v6.0.0, ..., v6.2.8].
- symfony/validator[v6.2.0, ..., v6.2.8] conflict with symfony/expression-language <5.4.
- drupal/core-recommended 10.0.7 requires symfony/http-foundation ~v6.2.6 -> satisfiable by symfony/http-foundation[v6.2.6, v6.2.7, v6.2.8].
- drupal/core-recommended 10.0.7 requires symfony/validator ~v6.2.5 -> satisfiable by symfony/validator[v6.2.5, v6.2.7, v6.2.8].
- drupal/console 1.9.10 requires drupal/console-core ^1.9.8 -> satisfiable by drupal/console-core[1.9.8].
- Root composer.json requires drupal/core-recommended 10.0.7 -> satisfiable by drupal/core-recommended[10.0.7].
- Root composer.json requires drupal/console ~1.0 -> satisfiable by drupal/console[1.0.0, ..., 1.9.10].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
composer.json
{
"name": "drupal/legacy-project",
"description": "Project template for Drupal 9 projects with composer following drupal/drupal layout",
"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": "^1.9",
"doctrine/common": "^3.2",
"drupal/block_content_suggestions": "^1.0",
"drupal/block_id": "2.0.x-dev@dev",
"drupal/console": "~1.0",
"drupal/core-composer-scaffold": "10.0.7",
"drupal/core-project-message": "10.0.7",
"drupal/core-recommended": "10.0.7",
"drupal/core-vendor-hardening": "^9.1",
"drupal/layout_builder_component_attributes": "2.x-dev@dev",
"drupal/link_attributes": "1.x-dev@dev",
"drupal/menu_block": "1.x-dev@dev",
"drupal/menu_link_attributes": "1.x-dev@dev",
"drupal/owlcarousel2": "^2.0",
"drupal/pathauto": "^1.8",
"drupal/redirect": "^1.6",
"drupal/twig_vardumper": "^3.1",
"drupal/upgrade_status": "^4.0",
"drupal/views_taxonomy_term_name_depth": "^7.2"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"drupal/console-extend-plugin": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"drupal/core-vendor-hardening": true
}
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "./"
}
},
"installer-paths": {
"core": [
"type:drupal-core"
],
"libraries/{$name}": [
"type:drupal-library"
],
"modules/contrib/{$name}": [
"type:drupal-module"
],
"profiles/contrib/{$name}": [
"type:drupal-profile"
],
"themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"modules/custom/{$name}": [
"type:drupal-custom-module"
],
"profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"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/legacy-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"
]
}
}
}