2

I am having issues installing symfony/var-dumper package via composer the command I ran is

composer require symfony/var-dumper

The result I get is

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

Problem 1
   - Conclusion: remove drupal/core-recommended 8.9.1
   - Conclusion: don't install drupal/core-recommended 8.9.1
   - Conclusion: don't install symfony/var-dumper v5.1.2
   - Conclusion: don't install symfony/var-dumper v5.1.1
   - Conclusion: don't install symfony/var-dumper v5.1.0
   - Conclusion: don't install symfony/var-dumper v5.1.0-RC2
   - Conclusion: don't install symfony/var-dumper v5.1.0-RC1
   - Conclusion: don't install symfony/var-dumper v5.1.0-BETA1
   - Installation request for drupal/core-recommended (locked at 8.9.1, required as ^8.8) -> satisfiable by drupal/core-recommended[8.9.1].
   - Conclusion: don't install symfony/var-dumper 5.2.x-dev
   - drupal/core-recommended 8.9.1 requires symfony/console v3.4.41 -> satisfiable by symfony/console[v3.4.41].
   - symfony/console v3.4.41 conflicts with symfony/var-dumper[5.1.x-dev].
   - symfony/var-dumper 5.1.x-dev conflicts with symfony/console[v3.4.41].
   - symfony/var-dumper 5.1.x-dev conflicts with symfony/console[v3.4.41].
   - Installation request for symfony/var-dumper ^5.1 -> satisfiable by symfony/var-dumper[5.1.x-dev, 5.2.x-dev, v5.1.0, v5.1.0-BETA1, v5.1.0-RC1, v5.1.0-RC2, v5.1.1, v5.1.2].
   Installation failed, reverting ./composer.json to its original content.

My composer.json file is

{
  "name": "drupal/legacy-project",
  "description": "Project template for Drupal 8 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": {
    "0": {
        "type": "composer",
        "url": "https://packages.drupal.org/8"
    },
    "drupal": {
        "type": "composer",
        "url": "https://packages.drupal.org/8"
    }
},
  "require": {
    "composer/installers": "^1.2",
    "drupal/core-composer-scaffold": "^8.8",
    "drupal/core-project-message": "^8.8",
    "drupal/core-recommended": "^8.8",
    "drupal/core-vendor-hardening": "^8.8",
    "phpmailer/phpmailer": "^6.1"
},
  "conflict": {
    "drupal/drupal": "*"
},
  "minimum-stability": "dev",
   "prefer-stable": true,
   "config": {
    "sort-packages": 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"
        ],
        "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"
        ]
    }
}
}

I haven't even customized it yet, this is pretty much out of the box at the moment and I am already having issues.

0

1 Answer 1

4

drupal/core-recommended 8.9.2 requires symfony/console v3.4.41 while the currently latest symfony/var-dumper requires symfony/console at minimum version 4.4. When you run composer require symfony/var-dumper without specifying any version it will try to install the currently latest version 5 of the var-dumper. Mismatched dependencies. Error. So simply install a version of the var-dumper that matches the dependencies and can be installed with Symfony 3.4 components.

composer require symfony/var-dumper:^4.4 
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.