Hello All,
When i am trying to upgrade my drupal site from version 8.9.9 to drupal 9.0.0 in my local environment, but i'm stuck. Could you please find the following

C:\xampp\htdocs\d-master>composer update
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/core-recommended 9.0.0 -> satisfiable by drupal/core-recommended[9.0.0].
- drupal/core-recommended 9.0.0 requires symfony/var-dumper v5.1.0 -> found symfony/var-dumper[v5.1.0] but it conflicts with your root composer.json require (4.0).

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

so i changed version of symfony/var-dumper from v4.0.0 to v5.1.0 then i got

C:\xampp\htdocs\d-master>composer update
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 drush/drush 10.0.1 -> satisfiable by drush/drush[10.0.1].
- drush/drush 10.0.1 requires symfony/var-dumper ^3.4 || ^4.0 -> found symfony/var-dumper[v3.4.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev] but it conflicts with your root composer.json require (5.1.0).

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

So i am again changed symfony/var-dumper version to 4.0.0 i got the previous error.
attaching the json file in .txt format.
Could you please help me to solve this issue and upgrade to drupal 9 ?

CommentFileSizeAuthor
composer.json_.txt6.88 KBtoby_toby

Comments

Toby_toby created an issue. See original summary.

toby_toby’s picture

Issue summary: View changes
longwave’s picture

Priority: Major » Normal

You have specified that you want exactly version 10.0.1 of Drush, which is not compatible with Drupal 9.

The following command requests Drupal 9.x and Drush 10.x (and also bumps symfony/var-dumper again) and works for me:

$ composer require drupal/core-recommended:^9 drush/drush:^10 symfony/var-dumper:^5

This then fails with patches:

  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/2019-11-11/2831233-83.patch (Field tokens for historical data fields (revisions) contain a hyphen, breaking twig templates and throwing an assertion error)
    https://www.drupal.org/files/issues/2020-05-30/cannot-use-relationship-2457999-236.patch (Cannot use relationship for rendered entity on Views)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2020-05-30/cannot-use-relationship-2457999-236.patch

You will need to figure out which of the patches are no longer required and which need new versions.

You also don't actually need to specify symfony/var-dumper in composer.json unless you are using it directly, Drupal core already depends on the correct version.

toby_toby’s picture

@longwave,thank you for your reply. patches removed which are no longer required. but error is still occur after running the command .
Problem 1
- Root composer.json requires drupal/core-recommended 9 -> satisfiable by drupal/core-recommended[9.0.0].
- drupal/core-recommended 9.0.0 requires symfony/var-dumper v5.1.0 -> found symfony/var-dumper[v5.1.0] but it conflicts with your root composer.json require (5).
Problem 2
- Root composer.json requires drush/drush 10 -> satisfiable by drush/drush[10.0.0].
- drush/drush 10.0.0 requires symfony/var-dumper ^3.4 || ^4.0 -> found symfony/var-dumper[v3.4.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev] but it conflicts with your root composer.json require (5).

longwave’s picture

Are you using Windows? The ^ is a special character in Windows, you might need to put quotes around the version requirements or use ^^ instead, I'm not sure.

toby_toby’s picture

@longwave, Thanks for your support! :) I am using windows. As you suggested, I used the quotes around the version requirements. After that it's upgraded to Drupal 9.

longwave’s picture

Status: Active » Fixed

Thanks for getting back to us, happy that it worked!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.