wikimedia / composer-merge-plugin

Merge one or more additional composer.json files at Composer runtime
MIT License
926 stars 160 forks source link

Merge-plugin beating out main composer on composer 2. #216

Open smustgrave opened 3 years ago

smustgrave commented 3 years ago

This is in reference to the discussion at the end of https://github.com/wikimedia/composer-merge-plugin/issues/184#issuecomment-819792656

Getting an error "from package repo (defining 1 package) has higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable." I tried all the settings but it seems the merge-plugin is beating out my main composer.

So with these Drupal sites we don't have a lot of control over other modules composer files. Ideally the main composer file should beat out the merged stuff

smustgrave commented 3 years ago

Here's my composer file if that helps. The conflict is coming from ckeditor/link. The file I'm including in the merge-plugin for webform also loads ckeditor/link but an older version. I would expect that my composer file would beat anything being merged or is that wrong?

{ "name": "drupal/recommended-project", "description": "Project template for Drupal 8 projects with a relocated document root", "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": [ { "type": "composer", "url": "https://packages.drupal.org/8" }, { "type": "package", "package": { "name": "jquery/jquery-ui-touch-punch", "version": "0.2.3", "dist": { "url": "https://github.com/furf/jquery-ui-touch-punch/archive/master.zip", "type": "zip" }, "type": "drupal-library" } }, { "type": "package", "package": { "name": "ckeditor/fakeobjects", "version": "4.14.1", "dist": { "url": "https://download.ckeditor.com/fakeobjects/releases/fakeobjects_4.14.1.zip", "type": "zip" }, "type": "drupal-library" } }, { "type": "package", "package": { "name": "ckeditor/iframe", "version": "4.14.1", "dist": { "url": "https://download.ckeditor.com/iframe/releases/iframe_4.14.1.zip", "type": "zip" }, "type": "drupal-library" } }, { "type": "package", "package": { "name": "ckeditor/link", "version": "4.15.0", "dist": { "url": "https://download.ckeditor.com/link/releases/link_4.15.0.zip", "type": "zip" }, "type": "drupal-library" }, "canonical": false }, { "type": "package", "package": { "name": "jackmoore/colorbox", "version": "dev-master", "dist": { "url": "https://github.com/jackmoore/colorbox/archive/master.zip", "type": "zip" }, "type": "drupal-library" } } ], "require": { "ext-json": "", "ckeditor/fakeobjects": "4.14.1", "ckeditor/iframe": "4.14.1", "ckeditor/link": "4.15.0", "composer/installers": "^1.9", "consolidation/robo": "^2.1", "cweagans/composer-patches": "^1.6", "drupal/address": "~1.0", "drupal/admin_toolbar": "^3.0", "drupal/anchor_link": "^2.4", "drupal/autologout": "^1.3", "drupal/better_exposed_filters": "^5.0@beta", "drupal/block_class": "^1.2", "drupal/block_content_revision_ui": "^2.127", "drupal/block_content_template": "^1.4", "drupal/block_title_link": "^1.1", "drupal/block_visibility_groups": "1.x-dev", "drupal/ckeditor_accordion": "^1.3", "drupal/ckeditor_iframe": "^2.1", "drupal/collapsiblock": "^3.0", "drupal/colorbox": "^1.7", "drupal/components": "^2.0@beta", "drupal/config_ignore": "3.x-dev", "drupal/config_split": "^2.0@beta", "drupal/content_moderation_notifications": "^3.3", "drupal/core-composer-scaffold": "^9.0.0", "drupal/core-project-message": "^9", "drupal/core-recommended": "^9.0.0@stable", "drupal/devel_entity_updates": "^3.0", "drupal/diff": "^1.0", "drupal/easy_breadcrumb": "^1.13", "drupal/entity_browser": "^2.5", "drupal/entity_clone": "^1.0@beta", "drupal/entity_embed": "^1.1", "drupal/entity_reference_revisions": "^1.8", "drupal/extlink": "^1.3", "drupal/facets": "^1.6", "drupal/feeds": "^3.0@alpha", "drupal/feeds_ex": "^1.0@alpha", "drupal/feeds_tamper": "^2.0@beta", "drupal/field_group": "^3.1", "drupal/formdazzle": "^2.1", "drupal/google_analytics": "^3.1", "drupal/google_tag": "^1.4", "drupal/health_check": "^1.2", "drupal/honeypot": "^2.0", "drupal/inline_entity_form": "^1.0@rc", "drupal/jquery_ui_accordion": "^1.1", "drupal/jsonapi_resources": "1.x-dev", "drupal/jsonapi_search_api": "^1.0@beta", "drupal/lark": "^1.0@beta", "drupal/layout_builder_modal": "^1.1", "drupal/layout_builder_restrictions": "^2.7", "drupal/layout_builder_styles": "^1.0@beta", "drupal/link_field_autocomplete_filter": "^1.14", "drupal/linkit": "^6.0@beta", "drupal/mailsystem": "^4.3", "drupal/media_entity_browser": "^2.0@alpha", "drupal/menu_block": "^1.6", "drupal/menu_item_extras": "^2.11", "drupal/menu_link_attributes": "^1.2", "drupal/modal_page": "^4.0", "drupal/paragraphs": "^1.12", "drupal/pathauto": "^1.8", "drupal/phpmailer_smtp": "^2.0", "drupal/publication_date": "2.x-dev@dev", "drupal/purge": "^3.0", "drupal/purge_queuer_url": "^1.0", "drupal/rabbit_hole": "^1.0@beta", "drupal/redirect": "^1.6", "drupal/redirect_after_login": "^2.6", "drupal/redis": "^1.4", "drupal/samlauth": "3.0-alpha2", "drupal/search_api": "^1.17", "drupal/search_api_attachments": "^1.0@beta", "drupal/search_api_exclude_entity": "^1.3", "drupal/search_api_solr": "^4.1", "drupal/simple_sitemap": "^3.7", "drupal/slack": "^1.3", "drupal/smart_trim": "^1.3", "drupal/stage_file_proxy": "1.x-dev", "drupal/svg_image": "^1.14", "drupal/tamper": "^1.0@alpha", "drupal/tooltip_taxonomy": "^1.5", "drupal/twig_field_value": "^2.0", "drupal/twig_tweak": "^3.0", "drupal/uswds_base": "^2.10@alpha", "drupal/views_conditional": "^1.2", "drupal/views_field_view": "^1.0@beta", "drupal/warmer": "^2.0", "drupal/webform": "^6.0", "drupal/webform_views": "^5.0@alpha", "drush/drush": "^10.2", "jackmoore/colorbox": "dev-master", "jquery/jquery-ui-touch-punch": "0.2.3", "predis/predis": "^1.1", "wikimedia/composer-merge-plugin": "^2.0.0" }, "require-dev": { "drupal/core-dev": "^9.0.0", "drupal/devel": "^3.0@dev", "kint-php/kint": "^3.3", "mglaman/drupal-check": "^1.1", "php-parallel-lint/php-console-color": "^0.3.0", "php-parallel-lint/php-console-highlighter": "^0.4.0", "php-parallel-lint/php-parallel-lint": "^1.2" }, "conflict": { "drupal/drupal": "" }, "minimum-stability": "beta", "prefer-stable": true, "extra": { "drupal-scaffold": { "locations": { "web-root": "wwwroot" }, "file-mapping": { "[web-root]/sites/development.services.yml": false } }, "installer-paths": { "wwwroot/core": ["type:drupal-core"], "wwwroot/libraries/{$name}": ["type:drupal-library"], "wwwroot/modules/contrib/{$name}": ["type:drupal-module"], "wwwroot/profiles/contrib/{$name}": ["type:drupal-profile"], "wwwroot/themes/contrib/{$name}": ["type:drupal-theme"], "drush/Commands/contrib/{$name}": ["type:drupal-drush"], "wwwroot/modules/custom/{$name}": ["type:drupal-custom-module"], "wwwroot/themes/custom/{$name}": ["type:drupal-custom-theme"] }, "patches": { "drupal/config_ignore": { "3117694 - Config in active storage not ignored": "https://www.drupal.org/files/issues/2020-05-28/3117694-active-config-25.patch" }, "drupal/search_api": { "Better logging for Search API": "https://www.drupal.org/files/issues/2018-07-30/search-api-catch-exception-2686159-13.patch" }, "drupal/feeds": { "Check for null feeds before processing": "https://www.drupal.org/files/issues/2020-08-30/feeds-deleted-feed-type-3104727-7.patch" }, "drupal/collapsiblock": { "508 fix for jumping collapse links": "https://git.drupalcode.org/project/collapsiblock/-/merge_requests/2/diffs.diff" }, "drupal/tooltip_taxonomy": { "Load library on views": "patches/tooltip_taxonomy/tooltip_taxonomy-load-library-views.patch", "508 fix for tooltip taxonomy": "patches/tooltip_taxonomy/tooltip_taxonomy-508-fixes.patch", "Remove duplicate tooltips": "patches/tooltip_taxonomy/tooltip_taxonomy-remove-duplicate-tooltips.patch" }, "drupal/uswds_base": { "Changing li to span for 508 purposes": "https://git.drupalcode.org/project/uswds_base/-/merge_requests/1.diff" }, "drupal/smart_trim": { "Javascript appearing when HTML is being stripped": "https://git.drupalcode.org/project/smart_trim/-/merge_requests/7.diff" }, "drupal/better_exposed_filters": { "Add fieldset awareness to DateRange Picker": "patches/better_exposed_filters/bef-datepicker-beta1.patch" }, "drupal/modal_page": { "508 Issues: Lost focus and missing ARIA": "patches/modal_pages/modal_page-508-fixes.patch", "Fix issues with modal not showing on multiple pages": "patches/modal_pages/modal_page-show-on-multiple-pages-fix.patch" }, "drupal/paragraphs": { "Integrity constraint violation: 1048 Column 'langcode' cannot be null": "https://www.drupal.org/files/issues/2021-03-01/2901390-76-integrity-constraint-violation-paragraph.patch" }, "drupal/core": { "Off-canvas style resets are overriding styles (especially SVGs) resulting in display issues": "https://www.drupal.org/files/issues/2021-01-06/off-canvas-style-resets-2958588-13.patch", "[PP-1] Implement a generic revision UI": "https://www.drupal.org/files/issues/2021-03-24/2350939-164.patch", "[PP-1] Use generic access API for node and media revision UI": "https://www.drupal.org/files/issues/2021-03-18/3043321-70.patch" } }, "merge-plugin": { "include": [ "wwwroot/modules/contrib/webform/composer.libraries.json" ], "recurse": false, "replace": false, "ignore-duplicates": true, "merge-dev": true, "merge-extra": false, "merge-extra-deep": false, "merge-scripts": false } }, "config": { "platform": { "php": "7.3", "ext-gd": "1" }, "sort-packages": true, "vendor-dir": "vendor" } }

smustgrave commented 3 years ago

wondering if anyone has found a solution? We had to downgrade composer back to get this to work.

smustgrave commented 3 years ago

Following up again if anyone has a solution or an alternative to composer merge plugin?

neclimdul commented 3 years ago

Grabbed your config and after removing some patches from your list everything installed cleanly without any errors. Couldn't recreate your "higher priority" error.

smustgrave commented 3 years ago

So on composer 2. Installing webform doesn't conflict with ckeditor/link?