-3

My upgrade is failing. I am at 8.9.19 and I used upgrade-status to make sure all my modules are compatible with next major core version. I am following instructions at https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-later

When I get to step 3, running composer update, I'm getting a slew of problems of the form

- drupal/core-recommended 9.0.0 requires drupal/core 9.0.0 -> found drupal/core[9.0.0] but it conflicts with your root composer.json require (^8.9.19)

mentioning all 9.x versions. I can post my entire composer.json if that will help, but I think these are the relevant lines:

        "drupal/core": "^8.9.19",
        "drupal/core-composer-scaffold": "^9",
        "drupal/core-project-message": "^9",
        "drupal/core-recommended": "^9",
...
    "require-dev": {
        "drupal/core-dev": "^9"
    },

I had originally created the project with

composer create-project drupal-composer/drupal-project:8.x-dev www --stability dev --no-interaction

Any suggestions, or pointers to a different tutorial on upgrading, would be greatly appreciated.

5
  • 1
    I think you need to remove the line "drupal/core": "^8.9.19", from your composer.json. Maybe also refer to drupal.org/docs/updating-drupal/… for updating drupal using composer, which highlights the difference between using drupal/core and drupal/core-recommended. The latter is the, well, recommended way at the moment.
    – berliner
    Nov 7, 2021 at 0:36
  • 1
    Yes. There is no need for that when you have core-recommended.
    – Kevin
    Nov 7, 2021 at 0:38
  • Thanks - I removed "drupal/core": "^8.9.19" and the previous errors went away, but I don't know what to make of these new ones; they are all similar to the last one: - Conclusion: don't install symfony/var-dumper v5.3.10 (conflict analysis result) - Root composer.json requires drupal/core-recommended ^9 -> satisfiable by drupal/core-recommended[9.0.0-alpha1, ..., 9.4.x-dev]
    – pglatz
    Nov 7, 2021 at 0:46
  • symfony/var-dumper is not in my composer.json -- aha, I found it in vendor/symfony/var-dumper/composer.json -- what is the correct way to remove this redpendency? Blow away the whole directory?
    – pglatz
    Nov 7, 2021 at 2:52
  • Does this answer your question? How do I fix a var-dumper conflict?
    – leymannx
    Nov 7, 2021 at 21:23

1 Answer 1

0

Solved, I had to remove the drupal/core package from the composer.json and update the Devel module to fix a conflict with symfony/var-dumper.

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.