1

I've inherited a site that I'm attempting to update - and when I attempt to update to the newest security patch - composer tells me that:

composer require drupal/core:8.6.10                                                                                               
./composer.json has been updated                                                                                         
Gathering patches for root package.                                                                                      
Loading composer repositories with package information                                                                   
Updating dependencies (including require-dev)                                                                            
Your requirements could not be resolved to an installable set of packages.                                               

  Problem 1                                                                                                              
   - Installation request for drupal/drupal No version set (parsed as 1.0.0) -> satisfiable by drupal/drupal[No version set (parsed as 1.0.0)].                                                                                                  
   - don't install drupal/core 8.6.10|remove drupal/drupal No version set (parsed as 1.0.0)                             
   - Installation request for drupal/core 8.6.10 -> satisfiable by drupal/core[8.6.10].  

I haven't seen this one before. What is it telling me I ought fix?

Here's the composer.json for drupal/drupal:

{
"name": "drupal/drupal",
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
"type": "project",
"license": "GPL-2.0-or-later",
"require": {
    "composer/installers": "^1.0.24",
    "wikimedia/composer-merge-plugin": "^1.4",
    "drush/drush": "^9.2",
    "drupal/core": "8.6.10",
    "drupal/google_analytics": "^2.2",
    "drupal/google_tag": "^1.0",
    "drupal/datalayer": "^1.0@beta",
    "drupal/block_visibility_groups": "^1.2",
    "drupal/lightning_layout": "^1.2",
    "drupal/geolocation": "^1.11",
    "drupal/linkit": "^4.3",
    "drupal/metatag": "^1.7",
    "drupal/redirect": "^1.3",
    "drupal/editor_file": "^1.2",
    "drupal/editor_advanced_link": "^1.4"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
    "preferred-install": "dist",
    "autoloader-suffix": "Drupal8"
},
"extra": {
    "_readme": [
        "By default Drupal loads the autoloader from ./vendor/autoload.php.",
        "To change the autoloader you can edit ./autoload.php.",
        "This file specifies the packages.drupal.org repository.",
        "You can read more about this composer repository at:",
        "https://www.drupal.org/node/2718229"
    ],
    "merge-plugin": {
        "include": [
            "core/composer.json"
        ],
        "recurse": true,
        "replace": false,
        "merge-extra": false
    },
    "installer-paths": {
        "core": ["type:drupal-core"],
        "modules/contrib/{$name}": ["type:drupal-module"],
        "profiles/contrib/{$name}": ["type:drupal-profile"],
        "themes/contrib/{$name}": ["type:drupal-theme"],
        "drush/contrib/{$name}": ["type:drupal-drush"],
        "modules/custom/{$name}": ["type:drupal-custom-module"],
        "themes/custom/{$name}": ["type:drupal-custom-theme"]
    },
    "patches": {
        "drupal/geolocation": {
            "Conditionally show the popover title": "https://www.drupal.org/files/issues/2921121-1.hide-location-title-completely.patch"
        }
    }
},
"autoload": {
    "psr-4": {
        "Drupal\\Core\\Composer\\": "core/lib/Drupal/Core/Composer"
    }
},
"scripts": {
    "pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump",
    "post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess",
    "post-package-install": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
    "post-package-update": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
    "drupal-phpunit-upgrade-check": "Drupal\\Core\\Composer\\Composer::upgradePHPUnit",
    "drupal-phpunit-upgrade": "@composer update phpunit/phpunit phpspec/prophecy symfony/yaml --with-dependencies --no-progress",
    "phpcs": "phpcs --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --",
    "phpcbf": "phpcbf --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --"
},
"repositories": [
    {
        "type": "composer",
        "url": "https://packages.drupal.org/8"
    }
]
}
3
  • Looks like you are missing the repository section. See it here: cgit.drupalcode.org/drupal/tree/composer.json
    – Kevin
    Commented Feb 21, 2019 at 19:49
  • whoops - it cut off on my original post Commented Feb 21, 2019 at 19:52
  • Probably not a solution per se...but a quick fix that worked for me was to switch to composer 1.7.2.
    – rtd1123
    Commented Feb 25, 2019 at 14:17

0

Browse other questions tagged or ask your own question.