Score:0

Upgrading from 8.9.20 to 9.3.9 causing errors

br flag

As the title suggests, I'm running into composer issues that I can't seem to figure out. I've found a few similar articles but none of them have seemed to fix my instance.

I've been following the steps from Upgrading from Drupal 8 to Drupal 9 (or later) and got stuck on step 3 composer update. I get the following errors:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/core-recommended 9.2.0-alpha1 requires symfony/var-dumper v5.2.6 -> satisfiable by symfony/var-dumper[v5.2.6].
    - Conclusion: don't install symfony/var-dumper v5.2.6 (conflict analysis result)
    - drupal/core-recommended 9.3.0-alpha1 requires symfony/var-dumper v5.3.8 -> satisfiable by symfony/var-dumper[v5.3.8].
    - Conclusion: don't install symfony/var-dumper v5.3.8 (conflict analysis result)
    - drupal/core-recommended[9.2.0-beta1, ..., 9.2.0-beta2] require symfony/var-dumper v5.2.8 -> satisfiable by symfony/var-dumper[v5.2.8].
    - Conclusion: don't install symfony/var-dumper v5.2.8 (conflict analysis result)
    - drupal/core-recommended 9.2.0-beta3 requires symfony/var-dumper v5.3.0-RC1 -> satisfiable by symfony/var-dumper[v5.3.0-RC1].
    - Conclusion: don't install symfony/var-dumper v5.3.0-RC1 (conflict analysis result)
    - drupal/core-recommended 9.3.0-beta1 requires symfony/var-dumper v5.3.10 -> satisfiable by symfony/var-dumper[v5.3.10].
    - Conclusion: don't install symfony/var-dumper v5.3.10 (conflict analysis result)
    - drupal/core-recommended 9.3.0-beta2 requires symfony/var-dumper v5.4.0-BETA2 -> satisfiable by symfony/var-dumper[v5.4.0-BETA2].
    - Conclusion: don't install symfony/var-dumper v5.4.0-BETA2 (conflict analysis result)
    - drupal/core-recommended[9.0.0-beta3, ..., 9.0.0-rc1] require symfony/var-dumper v5.0.8 -> satisfiable by symfony/var-dumper[v5.0.8].
    - Conclusion: don't install symfony/var-dumper v5.0.8 (conflict analysis result)
    - drupal/core-recommended[9.3.0-beta3, ..., 9.3.0-rc1] require symfony/var-dumper v5.4.0-RC1 -> satisfiable by symfony/var-dumper[v5.4.0-RC1].
    - Conclusion: don't install symfony/var-dumper v5.4.0-RC1 (conflict analysis result)
    - drupal/core-recommended[9.0.0, ..., 9.0.12] require symfony/var-dumper v5.1.0 -> satisfiable by symfony/var-dumper[v5.1.0].
    - Conclusion: don't install symfony/var-dumper v5.1.0 (conflict analysis result)
    - drupal/core-recommended[9.1.0-beta1, ..., 9.1.7] require symfony/var-dumper v5.1.8 -> satisfiable by symfony/var-dumper[v5.1.8].
    - Conclusion: don't install symfony/var-dumper v5.1.8 (conflict analysis result)
    - drupal/core-recommended[9.0.13, ..., 9.1.x-dev] require symfony/var-dumper v5.1.11 -> satisfiable by symfony/var-dumper[v5.1.11].
    - Conclusion: don't install symfony/var-dumper v5.1.11 (conflict analysis result)
    - drupal/core-recommended[9.2.0-rc1, ..., 9.2.x-dev] require symfony/var-dumper v5.3.0 -> satisfiable by symfony/var-dumper[v5.3.0].
    - Conclusion: don't install symfony/var-dumper v5.3.0 (conflict analysis result)
    - drupal/core-recommended[9.3.0, ..., 9.4.x-dev] require symfony/var-dumper v5.4.0 -> satisfiable by symfony/var-dumper[v5.4.0].
    - Conclusion: don't install symfony/var-dumper v5.4.0 (conflict analysis result)
    - drupal/core-recommended 9.0.0-alpha1 requires composer/installers v1.7.0 -> satisfiable by composer/installers[v1.7.0].
    - drupal/core-recommended[9.0.0-alpha2, ..., 9.0.0-beta2] require composer/installers v1.8.0 -> satisfiable by composer/installers[v1.8.0].
    - composer/installers[v1.7.0, ..., v1.8.0] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.
    - symfony/var-dumper v5.1.7 conflicts with symfony/var-dumper v5.1.7.
    - drupal/core-recommended 9.1.0-alpha1 requires symfony/var-dumper v5.1.7 -> satisfiable by symfony/var-dumper[v5.1.7].
    - Root composer.json requires drupal/core-recommended ^9 -> satisfiable by drupal/core-recommended[9.0.0-alpha1, ..., 9.4.x-dev].
    - Root composer.json requires phpunit/phpunit >=4.8.28 <5 -> satisfiable by phpunit/phpunit[4.8.28, ..., 4.8.36].

When I use composer depends symfony/var-dumper, I get the following:

drupal/devel         4.1.5    requires   symfony/var-dumper (^4 || ^5)
drush/drush          9.7.3    requires   symfony/var-dumper (^3.4 || ^4.0)
psy/psysh            v0.11.0  requires   symfony/var-dumper (^6.0 || ^5.0 || ^4.0 || ^3.4)
symfony/http-kernel  v3.4.44  conflicts  symfony/var-dumper (<3.3)

My composer.json file is below. Please let me know if there are any issues in here that are causing this.

{
    "name": "drupal-composer/drupal-project",
    "description": "Project template for Drupal 8 projects with composer",
    "type": "project",
    "license": "GPL-2.0+",
    "authors": [
        {
            "name": "",
            "role": ""
        }
    ],
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^1.2",
        "cweagans/composer-patches": "^1.7",
        "drupal/addtoany": "^1.9",
        "drupal/admin_toolbar": "^3.0",
        "drupal/adminimal_admin_toolbar": "^1.5",
        "drupal/adminimal_theme": "^1.3",
        "drupal/auto_entitylabel": "^3.0",
        "drupal/back_to_top": "^2.0",
        "drupal/better_exposed_filters": "^5.0",
        "drupal/blazy": "^2.5",
        "drupal/block_exclude_pages": "^2.0",
        "drupal/block_visibility_groups": "^1.2",
        "drupal/bootstrap": "^3.9",
        "drupal/classy_paragraphs": "^1.0@beta",
        "drupal/colorbox": "^1.4",
        "drupal/components": "^2.0",
        "drupal/config_split": "^1.4",
        "drupal/console": "~1.0",
        "drupal/console-launcher": "~1.0",
        "drupal/core-composer-scaffold": "^9",
        "drupal/core-project-message": "^9",
        "drupal/core-recommended": "^9",
        "drupal/crop": "^2.0",
        "drupal/date_range_formatter": "^4.0",
        "drupal/draggableviews": "^2.0",
        "drupal/dropzonejs": "^2.1",
        "drupal/ds": "^3.1",
        "drupal/easy_breadcrumb": "^2.0",
        "drupal/editor_advanced_link": "^1.4",
        "drupal/editor_file": "^1.2",
        "drupal/entity_browser": "^2.1",
        "drupal/entity_embed": "^1.0@beta",
        "drupal/facebook_pixel": "^1.0@alpha",
        "drupal/facets": "^1.0@beta",
        "drupal/fb_likebox": "^2.1",
        "drupal/field_group": "^3.0",
        "drupal/file_browser": "^1.1",
        "drupal/focal_point": "^1.0@beta",
        "drupal/fontawesome": "^2.19",
        "drupal/google_analytics": "^2.2",
        "drupal/header_and_footer_scripts": "^3.0",
        "drupal/honeypot": "^2.0",
        "drupal/iframe": "^2.0",
        "drupal/imce": "^2.0",
        "drupal/jquery_countdown_timer": "^1.2",
        "drupal/jquery_ui": "^1.4",
        "drupal/jquery_ui_datepicker": "^1.1",
        "drupal/jquery_ui_slider": "^1.1",
        "drupal/jquery_ui_touch_punch": "^1.0",
        "drupal/linkit": "^5.0@beta",
        "drupal/menu_link_attributes": "^1.0",
        "drupal/menu_trail_by_path": "^1.1",
        "drupal/metatag": "^1.4",
        "drupal/migrate_plus": "^5.1",
        "drupal/migrate_source_csv": "^3.4",
        "drupal/migrate_tools": "^5.0",
        "drupal/moderated_content_bulk_publish": "^2.0",
        "drupal/override_node_options": "^2.4",
        "drupal/paragraphs": "^1.2",
        "drupal/paragraphs_previewer": "^1.0",
        "drupal/pathauto": "^1.0",
        "drupal/rabbit_hole": "^1.0@beta",
        "drupal/redirect": "^1.2",
        "drupal/responsive_favicons": "^1.4",
        "drupal/responsive_menu": "^4.0",
        "drupal/scheduler": "^1.0",
        "drupal/schema_metatag": "^2.0",
        "drupal/search_api": "^1.6",
        "drupal/search_api_attachments": "^1.0@beta",
        "drupal/search_api_solr": "^1.2",
        "drupal/search_autocomplete": "^2.0",
        "drupal/simple_gmap": "^3.0",
        "drupal/simple_sitemap": "^4.0",
        "drupal/slick": "^2.0",
        "drupal/slick_views": "^2.0",
        "drupal/structure_sync": "^2.0",
        "drupal/superfish": "^1.3",
        "drupal/svg_image": "^1.8",
        "drupal/time_field": "^2.0",
        "drupal/tvi": "^1.0@beta",
        "drupal/twig_tweak": "^2.1",
        "drupal/video_embed_field": "^2.0",
        "drupal/views_autocomplete_filters": "^1.2",
        "drush/drush": "~8.0|^9.0.0-beta8",
        "symfony/property-access": "^4.3",
        "webflo/drupal-finder": "^1.0.0",
        "webmozart/path-util": "^2.3"
    },
    "require-dev": {
        "behat/mink": "~1.7",
        "behat/mink-goutte-driver": "~1.2",
        "drupal/devel": "^4.0",
        "drupal/masquerade": "^2.0@beta",
        "drupal/slick_extras": "^1.0@beta",
        "jcalderonzumba/gastonjs": "~1.0.2",
        "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
        "kint-php/kint": "^3.3",
        "mikey179/vfsstream": "~1.2",
        "phpunit/phpunit": ">=4.8.28 <5",
        "symfony/css-selector": "~2.8|~3.0"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true
    },
    "autoload": {
        "classmap": [
            "scripts/composer/ScriptHandler.php"
        ]
    },
    "scripts": {
        "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
        "pre-install-cmd": [
            "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
        ],
        "pre-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
        ],
        "post-install-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
            "cp web/modules/contrib/linkit/js/autocomplete.js web/modules/contrib/linkit/js/linkit.autocomplete.js"
        ],
        "post-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
            "cp web/modules/contrib/linkit/js/autocomplete.js web/modules/contrib/linkit/js/linkit.autocomplete.js"
        ]
    },
    "extra": {
        "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/contrib/{$name}": ["type:drupal-drush"]
        },
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "patches": {
          "drupal/core": {
            "CKEditor Style for <img> not working because it is an 'image' widget (drupal.org/project/drupal/issues/2642808)": "https://www.drupal.org/files/issues/2019-01-08/2642808-65.patch",
            "Indirect modification of overloaded element with Views responsive table (drupal.org/project/drupal/issues/2894449)": "https://www.drupal.org/files/issues/2018-10-05/core-indirect-modification-of-overloaded-element-2894449-18.patch",
            "Breadcrumb title doesn't reflect view contextual filter's title override (drupal.org/project/drupal/issues/2787051)": "https://www.drupal.org/files/issues/2018-12-23/drupal-view_title_with_contextual_filters-2787051-28.patch"
          }
        }
    }
}

Does anyone have any insights into what I need to do in order to update my site at all? Any help would be appreciated. I'm hoping it's as simple as just requiring an updated version of something.

EDIT: Would deleting my lock file help? Don't want to go about doing this in case it breaks something.

EDIT 2: I required an update to drush and then tried to composer update again but still get the below:

Problem 1
    - drupal/core-recommended 9.2.0-alpha1 requires symfony/var-dumper v5.2.6 -> satisfiable by symfony/var-dumper[v5.2.6].
    - Conclusion: don't install symfony/var-dumper v5.2.6 (conflict analysis result)
    - drupal/core-recommended 9.3.0-alpha1 requires symfony/var-dumper v5.3.8 -> satisfiable by symfony/var-dumper[v5.3.8].
    - Conclusion: don't install symfony/var-dumper v5.3.8 (conflict analysis result)
    - drupal/core-recommended[9.2.0-beta1, ..., 9.2.0-beta2] require symfony/var-dumper v5.2.8 -> satisfiable by symfony/var-dumper[v5.2.8].
    - Conclusion: don't install symfony/var-dumper v5.2.8 (conflict analysis result)
    - drupal/core-recommended 9.2.0-beta3 requires symfony/var-dumper v5.3.0-RC1 -> satisfiable by symfony/var-dumper[v5.3.0-RC1].
    - Conclusion: don't install symfony/var-dumper v5.3.0-RC1 (conflict analysis result)
    - drupal/core-recommended 9.3.0-beta1 requires symfony/var-dumper v5.3.10 -> satisfiable by symfony/var-dumper[v5.3.10].
    - Conclusion: don't install symfony/var-dumper v5.3.10 (conflict analysis result)
    - drupal/core-recommended 9.3.0-beta2 requires symfony/var-dumper v5.4.0-BETA2 -> satisfiable by symfony/var-dumper[v5.4.0-BETA2].
    - Conclusion: don't install symfony/var-dumper v5.4.0-BETA2 (conflict analysis result)
    - drupal/core-recommended[9.0.0-beta3, ..., 9.0.0-rc1] require symfony/var-dumper v5.0.8 -> satisfiable by symfony/var-dumper[v5.0.8].
    - Conclusion: don't install symfony/var-dumper v5.0.8 (conflict analysis result)
    - drupal/core-recommended[9.3.0-beta3, ..., 9.3.0-rc1] require symfony/var-dumper v5.4.0-RC1 -> satisfiable by symfony/var-dumper[v5.4.0-RC1].
    - Conclusion: don't install symfony/var-dumper v5.4.0-RC1 (conflict analysis result)
    - drupal/core-recommended[9.0.0, ..., 9.0.12] require symfony/var-dumper v5.1.0 -> satisfiable by symfony/var-dumper[v5.1.0].
    - Conclusion: don't install symfony/var-dumper v5.1.0 (conflict analysis result)
    - drupal/core-recommended[9.1.0-beta1, ..., 9.1.7] require symfony/var-dumper v5.1.8 -> satisfiable by symfony/var-dumper[v5.1.8].
    - Conclusion: don't install symfony/var-dumper v5.1.8 (conflict analysis result)
    - drupal/core-recommended[9.0.13, ..., 9.1.x-dev] require symfony/var-dumper v5.1.11 -> satisfiable by symfony/var-dumper[v5.1.11].
    - Conclusion: don't install symfony/var-dumper v5.1.11 (conflict analysis result)
    - drupal/core-recommended[9.2.0-rc1, ..., 9.2.x-dev] require symfony/var-dumper v5.3.0 -> satisfiable by symfony/var-dumper[v5.3.0].
    - Conclusion: don't install symfony/var-dumper v5.3.0 (conflict analysis result)
    - drupal/core-recommended[9.3.0, ..., 9.4.x-dev] require symfony/var-dumper v5.4.0 -> satisfiable by symfony/var-dumper[v5.4.0].
    - Conclusion: don't install symfony/var-dumper v5.4.0 (conflict analysis result)
    - drupal/core-recommended 9.0.0-alpha1 requires composer/installers v1.7.0 -> satisfiable by composer/installers[v1.7.0].
    - drupal/core-recommended[9.0.0-alpha2, ..., 9.0.0-beta2] require composer/installers v1.8.0 -> satisfiable by composer/installers[v1.8.0].
    - composer/installers[v1.7.0, ..., v1.8.0] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.
    - symfony/var-dumper v5.1.7 conflicts with symfony/var-dumper v5.1.7.
    - drupal/core-recommended 9.1.0-alpha1 requires symfony/var-dumper v5.1.7 -> satisfiable by symfony/var-dumper[v5.1.7].
    - Root composer.json requires drupal/core-recommended ^9 -> satisfiable by drupal/core-recommended[9.0.0-alpha1, ..., 9.4.x-dev].
    - Root composer.json requires phpunit/phpunit >=4.8.28 <5 -> satisfiable by phpunit/phpunit[4.8.28, ..., 4.8.36].
Score:2
id flag

composer require drush/drush to upgrade to Drush 10 first. Drush 9 is not compatible with Drupal 9.

ACanadianCoder avatar
br flag
So I did `composer require drush/drush --no-update` followed by `composer update`. I still get the above error in EDIT 2.
id flag
What is the current Drush version? Version 9.7.3 cannot use symfony/var-dumper v5. Why did you pass `--no-update` to `composer require`?
ACanadianCoder avatar
br flag
I do have version 9.7.3 installed. It also may be globally installed as well. I did the `no-update` because I got another error without using it.
cn flag
At this point I would just make the updates in composer.json manually (change the version to `^11` for `drush/drush`), delete composer.lock, and run `composer install`. You'll be chasing dependencies all weekend otherwise. Bear in mind this will update all packages to the most recent allowed by their version constraints, and you should definitely test this thoroughly before sending to prod
cn flag
Above comment assumes you've already run an upgrade check and also upgraded version numbers for any contrib modules which need a major version bump for D9
ACanadianCoder avatar
br flag
So I tried to do what Clive mentioned above, yet I still get the same error as I got in EDIT 2. I deleted the lock file and manually put in `^11` for `drush` and `^9.0` for `core-composer-scaffold` and `core-recommended` in the composer.json file. Seems that var-dumper is giving me issues.
Score:0
br flag

Just wanted to post my solution on here in case anyone else runs into the same issue.

I ended up following this blog post: https://gorannikolovski.com/blog/how-to-upgrade-drupal-8-to-9 and what seemed to do it for me was removing the following dev requirements from my composer file composer remove behat/mink behat/mink-goutte-driver jcalderonzumba/gastonjs jcalderonzumba/mink-phantomjs-driver mikey179/vfsstream phpunit/phpunit symfony/css-selector.

I ended up having to update a couple other smaller errors thrown at me after this but once I did that, it was smooth sailing.

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.