To anyone affected by this, read comment #3 below.
Original Report
https://github.com/composer/composer/blob/master/CHANGELOG.md
Composer behavior change issue: https://github.com/composer/composer/pull/7454
1.7.3 2018-11-01
Fixed handling of replace/conflict rules. This may affect dependency resolution in some edge cases.When trying anything with composer like update / require / remove:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- don't install drupal/core 8.6.3|remove drupal/drupal dev-dev
- remove drupal/drupal dev-dev|remove drupal/core 8.6.3
- Installation request for drupal/drupal dev-dev -> satisfiable by drupal/drupal[dev-dev].
- Installation request for drupal/core (installed at 8.6.3) -> satisfiable by drupal/core[8.6.3].My full composer.json:
{
"name": "drupal/drupal",
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
"type": "project",
"license": "GPL-2.0+",
"require": {
"composer/installers": "^1.0.21",
"wikimedia/composer-merge-plugin": "~1.3",
"drupal/admin_toolbar": "^1.18",
"drupal/adminimal_admin_toolbar": "^1.3",
"drupal/console": "~1.0",
"drupal/config_partial_export": "^1.4",
"drupal/config_split": "^1.2",
"drupal/paragraphs": "^1.1",
"drupal/video": "^1.2",
"drupal/cookieconsent": "^1.1",
"drupal/webform": "^5.0-beta4",
"drupal/devel": "^1.2",
"drupal/field_group": "^1.0",
"drupal/email_registration": "1.x-dev",
"drupal/field_permissions": "1.x-dev",
"drupal/masquerade": "2.x-dev",
"drupal/auto_entitylabel": "2.x-dev",
"drupal/administerusersbyrole": "2.x-dev",
"drupal/clientside_validation": "^1.0",
"drupal/core": "^8.6.0",
"drupal/search_api": "^1.4",
"drupal/adminimal_theme": "^1.3",
"drupal/maxlength": "1.x-dev",
"drupal/taxonomy_access_fix": "^2.0",
"drupal/twig_tweak": "^1.5",
"drupal/twitter_block": "3.x-dev",
"drupal/better_exposed_filters": "^3.0@alpha",
"drupal/easy_breadcrumb": "^1.6",
"drupal/pathauto": "^1.0",
"drupal/metatag": "^1.0",
"drupal/password_policy": "^3.0-alpha3",
"drupal/simple_sitemap": "^2.8",
"drupal/smart_trim": "^1.0",
"drupal/focal_point": "^1.0@beta",
"drupal/editor_advanced_link": "^1.4",
"drupal/chosen": "^2.2",
"drupal/computed_field": "2.x-dev",
"drupal/inline_entity_form": "1.x-dev",
"drupal/reroute_email": "1.x-dev",
"drupal/allowed_formats": "^1.1",
"drupal/imce": "^1.5",
"drupal/simple_styleguide": "1.x-dev",
"drupal/rabbit_hole": "1.x-dev",
"drupal/video_embed_field": "^1.5",
"drupal/view_unpublished": "1.x-dev",
"drupal/menu_firstchild": "1.x-dev",
"drupal/menu_admin_per_menu": "1.x-dev",
"drupal/recaptcha": "^2.2",
"ddeboer/vatin": "^2.0",
"drupal/swiftmailer": "1.x-dev",
"drupal/mass_pwreset": "^1.0@alpha",
"drupal/redirect": "^1.2",
"drupal/shield": "^1.1",
"drupal/node_view_permissions": "1.x-dev",
"drupal/events_log_track": "^1.1",
"drupal/google_analytics": "^2.2",
"drupal/diff": "^1.0@RC",
"drupal/address": "^1.4",
"drupal/views_data_export": "^1.0@beta",
"drupal/telephone_formatter": "^1.0@beta",
"drupal/telephone_validation": "^2.1",
"drupal/contribute": "^5.0@beta"
},
"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."
],
"merge-plugin": {
"include": [
"core/composer.json"
],
"recurse": false,
"replace": false,
"merge-extra": false
},
"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/contrib/{$name}": ["type:drupal-drush"]
}
},
"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"
},
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"jqueryvalidate": {
"type": "package",
"package": {
"name": "jqueryvalidate",
"version": "1.15.0",
"type": "drupal-library",
"dist": {
"url": "https://jqueryvalidation.org/files/jquery-validation-1.15.0.zip",
"type": "zip"
}
}
}
},
"require-dev": {
"drupal/rules": "3.x-dev"
}
}
Comments
Comment #2
Pascal- commentedConfirmed that this does work with Composer 1.7.2
It does not work with Composer 1.7.3 or 1.8.0
Comment #3
cilefen commentedWhy is
"core/composer.json"in the merge plugin configuration? I think we used to promote that but I had to remove it to proceed.Comment #4
berdirTrying to work with a normal drupal installation (drupal/drupal) was always very problematic, I would strongly recommend you convert to https://github.com/drupal-composer/drupal-project. This might change again as composer support is improved, but it is for now far more reliable.
Comment #5
cilefen commentedTrue.
As for the immediate issue, #3 will likely fix this for you. And at this stage, you could change the name value to myorg/project_name because you in fact "own" this composer.json now. It isn't drupal/drupal.
There is not a reason to merge core/composer.json because Drupal's dependencies have already been worked out by requiring drupal/core. And it looks like this now makes it impossible to
composer install. Other people will encounter this problem.Comment #6
Pascal- commentedConfirmed that #3 solves this.
Removed the following from my composer.json:
Should we patch this?
Comment #7
cilefen commentedIt looks like #3020337: Composer returns "Your requirements could not be resolved to an installable set of packages" when core/composer.json is included in the merge plugin configuration may be dealing with this.
Comment #8
cilefen commentedComment #9
cilefen commentedComment #11
tea.time commented@cilefen I am guessing you meant #2912387: Stop using wikimedia/composer-merge-plugin in #7 :)
Comment #12
cilefen commentedYes.
Comment #13
cilefen commentedComment #14
cilefen commentedComment #15
cilefen commentedComment #16
firfin commentedWhile searching for a solution to my problem I keep running into this issue. So although it's old I am still asking my question here, hoping somebody can clear this up. For me and all those who suffer through this after me, so:
For people still running into this, is @berdir's comment in #4 still relevant?
And if so, is there a guide on how to 'convert' ?
And if not, what is the recommended course now?
Even or especially when coming from a 'drupal/drupal' install?
Comment #17
mmjvb commentedSort of, yes. The actual issue reported by composer is an error in your specifications. Bad use of merge plugin: don't have drupal/core both in require and merge-plugin. Either in require or in merge-plugin. Unfortunately, when in merge-plugin it is not updatable with `composer update` like dependencies mentioned in require.
This is why it changed for most project templates. At least those meant for starting a site.
Not aware of a guide, instructions already provided here in this issue. But, consider them incomplete. Suggest to start with a decent template and merge the require section into it.
Start new with your site. Keep the drupal/drupal site for development. Don't try to turn it into a site.
Comment #18
firfin commentedThanks, for your clarification @mmjvb
Unfortunately, this IS already a site. So updating is a necessity, although almost seemingly impossible.
But I will try starting 'with a decent template and merge the require section' on a fresh server.
I guess I best start with locking versions to the current versions then also?
And when 'converted' to a modern / normal ( i.e. drupal/recommended-project) installation I can then update normally I assume?
Comment #19
berdir> Unfortunately, this IS already a site
Creating a new "site" in this case means creating a new code base, from a clean composer template, then you add all your contrib modules/themes, copy over the all custom code including files and settings.php. So in the end it is the same site, you just rebuilt the code base.
If you've never done that before, you might want to try to set up a new project with it first, so you can get used to it, a few things are different, for example your webserver needs to point to the web/ directory.
Comment #20
mmjvb commentedOnce converted to proper template you should be able to update normally. That does assume you are not locking anything. Your version requirements should allow for patch releases as a minimum. You might allow minor updates, selectively or in general. There is no need for pinning down to particular versions. Keeping current should be your objective, migrating to latest versions when possible.
Don't forget that a proper template consists of more than just a composer.json with a require section.
Comment #21
firfin commentedThanks for the further explanations @Berdir and @mmjvb , this gave me the courage and understanding to proceed.
In the end it all went smoother than I feared.
For future reference:
- create a new site with: composer create-project drupal/recommended-project
- merge in the old composer.json, especially the required section. Some care is needed as some packages are no longer needed (e.g. wikimedia/composer-merge-plugin). Also take a good look at which version of modules you want to use and if there is an upgrade path from the older version to a new one. Or if there is some manual migration of settings needed.
- composer update
- copy old 'files' dir and possibly patches (better yet get the patches into composer.json with cweagans/composer-patches)
- copy over old database
- drush updb
- drush cr
- enjoy shiny new updated site!
Comment #22
mmjvb commentedYou could improve by:
- use --no-install on create-project
- adjust require section
-- add from original project
-- remove undesired from new project
- run composer install
The benefit is that there is less chance of conflicting dependencies. The requirements are resolved when they are complete rather than in two steps.
Comment #23
aswathyajish commentedI also have the same issue.
My composer version is 2.0.6.
Any solution to this?
Comment #24
cilefen commented@AswathyAjish Did you read the issue and comments?