Score:-3

Upgrading from 8.9.19 to 9 fails because of root composer.json require (^8.8.0)

in flag

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.

berliner avatar
bd flag
I think you need to remove the line `"drupal/core": "^8.9.19",` from your composer.json. Maybe also refer to https://www.drupal.org/docs/updating-drupal/updating-drupal-core-via-composer 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.
Kevin avatar
in flag
Yes. There is no need for that when you have core-recommended.
pglatz avatar
in flag
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 avatar
in flag
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?
leymannx avatar
ne flag
Does this answer your question? [How do I fix a var-dumper conflict?](https://drupal.stackexchange.com/questions/308077/how-do-i-fix-a-var-dumper-conflict)
Score:0
in flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.