0

I have to develop features for an old project stuck on drupal 8.5, so I figured out it would be great to update the core version to at least 8.8 for a start. The project is setup using composer and drush, so I started following the steps listed in https://www.drupal.org/docs/updating-drupal/migrating-the-composer-project-for-drupal-earlier-than-880 But I'm stucked with an error in "Migrating from drupal-composer/drupal-scaffold to drupal/core-composer-scaffold"

This is the initial composer.json

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^1.2",
        "cweagans/composer-patches": "^1.6",
        "drupal-composer/drupal-scaffold": "^2.2",
        "drupal/admin_toolbar": "^1.23",
        "drupal/ajax_comments": "^1.0@beta",
        "drupal/allowed_formats": "^1.1",
        "drupal/better_exposed_filters": "^3.0@alpha",
        "drupal/colorbutton": "^1.1",
        "drupal/console": "^1.0.2",
        "drupal/core": "~8.5.3",
        "drupal/devel": "^1.2",
        "drupal/eu_cookie_compliance": "^1.0",
        "drupal/filefield_paths": "^1.0@beta",
        "drupal/google_analytics": "^3.0",
        "drupal/metatag": "^1.5",
        "drupal/paragraphs": "^1.3",
        "drupal/pathauto": "^1.2",
        "drupal/quick_node_clone": "^1.10",
        "drupal/simple_sitemap": "^2.12",
        "drupal/smtp": "^1.0@beta",
        "drupal/video_embed_field": "^2.4",
        "drupal/views_infinite_scroll": "^1.5",
        "drupal/viewsreference": "^1.2",
        "drupal/webform": "^5.0@RC",
        "drupal/yoast_seo": "2.0-alpha3",
        "drush/drush": "^9.0.0",
        "vlucas/phpdotenv": "^2.4",
        "webflo/drupal-finder": "^1.0.0",
        "webmozart/path-util": "^2.3"
    },
    "require-dev": {
        "webflo/drupal-core-require-dev": "~8.5.3"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true
    },
    "autoload": {
        "classmap": [
            "scripts/composer/ScriptHandler.php"
        ],
        "files": ["load.environment.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"
        ],
        "post-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
        ]
    },
    "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/Commands/{$name}": ["type:drupal-drush"]
        }
    }
}

Running the first step (Migrating from webflo/drupal-core-require-dev to drupal/core-dev) was pretty strait forward but from the second I'm stuck with an error as I run composer require drupal/core-composer-scaffold:^8.8

This is the full error message

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

  Problem 1
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.11
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.10
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.9
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.8
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.7
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.6
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.5
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.4
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.3
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.2
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.1
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.0
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.12
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.11
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.10
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.9
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.8
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.7
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.6
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.5
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.4
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.3
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.2
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.1
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.0
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.0-rc1
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.0-rc1
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.0-beta3
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.0-beta2
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.0-beta1
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.0-beta1
    - Conclusion: don't install drupal/core-composer-scaffold 8.8.0-alpha1
    - Conclusion: don't install drupal/core-composer-scaffold 8.9.x-dev
    - drupal/core-composer-scaffold 8.8.x-dev conflicts with drupal-composer/drupal-scaffold[2.5.4].
    - drupal/core-composer-scaffold 8.8.x-dev conflicts with drupal-composer/drupal-scaffold[2.5.4].
    - drupal/core-composer-scaffold 8.8.x-dev conflicts with drupal-composer/drupal-scaffold[2.5.4].
    - Installation request for drupal/core-composer-scaffold ^8.8 -> satisfiable by drupal/core-composer-scaffold[8.8.0, 8.8.0-alpha1, 8.8.0-beta1, 8.8.0-rc1, 8.8.1, 8.8.10, 8.8.11, 8.8.12, 8.8.2, 8.8.3, 8.8.4, 8.8.5, 8.8.6, 8.8.7, 8.8.8, 8.8.9, 8.8.x-dev, 8.9.0, 8.9.0-beta1, 8.9.0-beta2, 8.9.0-beta3, 8.9.0-rc1, 8.9.1, 8.9.10, 8.9.11, 8.9.2, 8.9.3, 8.9.4, 8.9.5, 8.9.6, 8.9.7, 8.9.8, 8.9.9, 8.9.x-dev].
    - Installation request for drupal-composer/drupal-scaffold (locked at 2.5.4) -> satisfiable by drupal-composer/drupal-scaffold[2.5.4].

I'm considering giving up on the upgrade since this is only the beginning and it should be the easy part since I don't have to handle the database yet.

How do I fix these errors?

4
  • 1
    Looks like you didn't follow the instructions in the link - specifically it says you need to remove drupal-composer/drupal-scaffold first – Clive Jan 6 at 12:01
  • Well, I did run composer remove drupal-composer/drupal-scaffold --no-update and still got this message, hence my post. My current composer.json no longer has "drupal-composer/drupal-scaffold": "^2.2" but there is still a line mentionning drupal-scaffold in the scripts, maybe the problem come from this line ? – Ticiope Jan 6 at 12:14
  • I would look at the content of composer.lock, as drupal-composer/drupal-scaffold (locked at 2.5.4) seems to suggest that file still has a reference to drupal-composer/drupal-scaffold. – kiamlaluno Jan 6 at 12:19
  • Hi, please create a new post if you have a new question. Thanks – Clive Jan 6 at 13:16
2

The Installation request for drupal-composer/drupal-scaffold (locked at 2.5.4) -> satisfiable by drupal-composer/drupal-scaffold[2.5.4] part means the composer.lock file contains a reference to that version of the drupal-composer/drupal-scaffold package.

Since you already ran composer remove drupal-composer/drupal-scaffold, remove the line referring to the drupal-composer/drupal-scaffold package from the composer.lock file, and run again composer require drupal/core-composer-scaffold:^8.8.

1

In the end running composer remove drupal-composer/drupal-scaffold instead of composer remove drupal-composer/drupal-scaffold --no-update solved the issue. No idea why the line specified in the doc has this --no-update.

1
  • Please don't ask questions in answers - you can always create a new post if you have a new question. Thanks – Clive Jan 6 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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