Problem/Motivation

"color" deprecated module from core uninstalled, after this:
$composer require 'drupal/color:^1.0'
Result:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/color ^1.0, found drupal/color[1.0.1] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

...
this is the list of my required modules:
"require": {
"commerceguys/addressing": "^1.3",
"commerceguys/intl": "^1.1",
"composer/installers": "^1.12",
"cweagans/composer-patches": "^1.7.2",
"defuse/php-encryption": "^2.3",
"dompdf/dompdf": "^0.8.3",
"drupal/account_modal": "^1.0@RC",
"drupal/address": "^1.10",
"drupal/admin_toolbar": "2.x-dev",
"drupal/advagg": "^4.1",
"drupal/allowed_formats": "^1.5",
"drupal/backup_migrate": "^5.0",
"drupal/better_exposed_filters": "^5.0",
"drupal/block_class": "^2.0@beta",
"drupal/block_styles": "^2.0",
"drupal/blog": "2.x-dev",
"drupal/bootstrap_barrio": "^4.33",
"drupal/bootstrap_sass": "^4.12",
"drupal/ckeditor_accordion": "^1.3",
"drupal/colorbox": "^1.10",
"drupal/colorbox_inline": "^1.2",
"drupal/commerce": "^2.30",
"drupal/commerce_combine_carts": "^1.0@RC",
"drupal/commerce_feeds": "1.x-dev@dev",
"drupal/commerce_invoice": "^2.0@RC",
"drupal/commerce_order_pdf": "1.x-dev",
"drupal/commerce_pado": "^1.1",
"drupal/commerce_paypal": "^1.0@RC",
"drupal/commerce_product_bundle": "1.x-dev@dev",
"drupal/commerce_reports": "^1.0@RC",
"drupal/commerce_shipping": "^2.3",
"drupal/commerce_stock": "^1.0",
"drupal/commerce_stock_notifications": "^1.0@alpha",
"drupal/commerce_trustedshops": "^2.0@RC",
"drupal/computed_field": "^3.0@alpha",
"drupal/config_filter": "^2.3",
"drupal/config_split": "^2.0@beta",
"drupal/console": "^1.9",
"drupal/contact_block": "^1.6",
"drupal/contact_storage": "^1.1",
"drupal/content_feedback": "^1.3",
"drupal/context": "^4.1",
"drupal/cookies": "^1.0",
"drupal/core-composer-scaffold": "^9.4",
"drupal/core-project-message": "^9.4",
"drupal/core-recommended": "^9.4",
"drupal/ctools": "^3.7",
"drupal/db_maintenance": "^2.0",
"drupal/dc_ajax_add_cart": "^2.0",
"drupal/degov_simplenews": "^2.0",
"drupal/devel": "^4.1",
"drupal/devel_entity_updates": "^3.0",
"drupal/devel_kint_extras": "^1.0",
"drupal/devel_php": "^1.5",
"drupal/domain_registration": "^1.6",
"drupal/easy_breadcrumb": "^2.0",
"drupal/entity_clone": "^1.0@beta",
"drupal/entity_reference_quantity": "2.x-dev@dev",
"drupal/environment_indicator": "^4.0",
"drupal/facets": "^2.0",
"drupal/faq": "1.x-dev",
"drupal/feeds": "^3.0@beta",
"drupal/feeds_tamper": "2.x-dev@dev",
"drupal/file_mdm": "^2.4",
"drupal/fontawesome": "^2.23",
"drupal/google_analytics": "^3.1",
"drupal/google_tag": "^1.5",
"drupal/http_cache_control": "^2.0",
"drupal/image_effects": "^3.2",
"drupal/image_raw_formatter": "2.0",
"drupal/imce": "^2.4",
"drupal/inline_entity_form": "^1.0@RC",
"drupal/jquery_ui": "^1.4",
"drupal/linked_field": "^1.3",
"drupal/masquerade": "^2.0@beta",
"drupal/me_redirect": "^1.0@beta",
"drupal/menu_item_role_access": "^2.0",
"drupal/menu_link_attributes": "^1.2",
"drupal/metatag": "^1.19",
"drupal/migrate_plus": "^6.0",
"drupal/page_manager": "^4.0@beta",
"drupal/panelizer": "^4.4",
"drupal/paragraphs": "^1.14",
"drupal/pathauto": "^1.10",
"drupal/php": "1.x-dev@dev",
"drupal/quicktabs": "3.x-dev",
"drupal/recaptcha": "^3.0",
"drupal/redirect": "^1.7",
"drupal/redis": "^1.5",
"drupal/reroute_email": "^1.2",
"drupal/schema_metatag": "^2.3",
"drupal/search_api": "^1.23",
"drupal/search_api_autocomplete": "^1.6",
"drupal/selective_better_exposed_filters": "^2.0@beta",
"drupal/sidr": "4.x-dev@dev",
"drupal/simple_sitemap": "^4.1",
"drupal/simplenews": "^2.0@beta",
"drupal/slick": "^2.6",
"drupal/slick_views": "^2.6",
"drupal/state_machine": "^1.6",
"drupal/structure_sync": "^2.0",
"drupal/swiftmailer": "2.x-dev",
"drupal/symfony_mailer": "^1.0@alpha",
"drupal/tamper": "1.x-dev@dev",
"drupal/taxonomy_menu": "3.x-dev",
"drupal/token": "^1.10",
"drupal/twig_tools": "^1.4",
"drupal/twig_tweak": "^2.9",
"drupal/typed_data": "^1.0@beta",
"drupal/ultimate_cron": "^2.0@alpha",
"drupal/ultimenu": "^2.7.0",
"drupal/upgrade_status": "^3.14",
"drupal/video_embed_field": "^2.4",
"drupal/views_accordion": "^2.0",
"drupal/views_block_filter_block": "^1.2",
"drupal/views_bootstrap": "^4.3",
"drupal/views_contextual_filters_or": "^1.3",
"drupal/views_data_export": "^1.1",
"drupal/votingapi": "^3.0@beta",
"drupal/yoast_seo": "^2.0@alpha",
"drush/drush": "^11.0",
"jairovsky/geoplugin": "dev-master",
"paypal/rest-api-sdk-php": "^1.14",
"phpunit/phpunit": "^9.5",
"politsin/jquery-ui-touch-punch": "^1.0",
"predis/predis": "^1.1",
"symfony/event-dispatcher": "4.4.42",
"tecnickcom/tcpdf": "^6.2",
"vlucas/phpdotenv": "^2.6",
"webflo/drupal-finder": "^1.2.2",
"webmozart/path-util": "^2.3",
"wikimedia/composer-merge-plugin": "^2.0"
},

Comments

terminator727 created an issue. See original summary.

jupedega’s picture

I have the same problem. I have updated to version 9.4.1. I have disabled the core color module and it gives me an error.

$composer require 'drupal/color:^1.0'
Result:
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires drupal/color ^1.0, found drupal/color[dev-1.x, 1.0.1, 1.x-dev (alias of dev-1.x)] but these were not loaded, likely because it conflicts with another require.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

spokje’s picture

There's currently a known issue that Contrib Incarnations of Deprecated Core modules, like Color, aren't installable on 9.4.x.

There is/will be a debate if this is fixable without breaking stuff. It's part of this issue: #3292932: [Policy, no patch] Deprecating/Removing Core Modules

TLDR: Currently it is indeed not possible to instal this module on any 9.4 version of Drupal Core. Options are being looked into to make this happen.

spokje’s picture

Title: Problem on Drupal 9.4.1. module not loaded becouse conflicts with another require » [PP-1] Problem on Drupal 9.4.1. module not loaded becouse conflicts with another require
Status: Active » Postponed

Marking this as postponed on #3292932: [Policy, no patch] Deprecating/Removing Core Modules where Big Brains will decide if and how we can make installing deprecated Core modules, like in this case Color, possible without possibly starting The Apocalypse.

spokje’s picture

mmjvb’s picture

It seems they are back porting the removal of the replace section of drupal/core.

Currently, they prohibits using drupal/color for the contrib module with composer. That is why you need drupal/color-color.

When you use a version of drupal/core that has the module removed it is no longer in the replace and can be used with composer to refer to the contrib. In which case you can replace drupal/color-color with drupal/color.

This is the way it was intended to work. Currently, they are removing everything from and the replace section. Disagree with that from the composer pov, but am ignored.

andypost’s picture

Title: [PP-1] Problem on Drupal 9.4.1. module not loaded becouse conflicts with another require » Problem on Drupal 9.4.1. module not loaded becouse conflicts with another require
Version: 1.0.1 » 1.x-dev
Status: Postponed » Postponed (maintainer needs more info)

Created 1.0.2 release, please report any issues with installing?

mmjvb’s picture

Failing on no longer stating drupal/core provides drupal/media:

docker@cli:/var/www$ composer require drupal/color --dry-run
Using version ^1.0 for drupal/color
./composer.json has been updated
Running composer update drupal/color
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/responsive_media_image is locked to version 1.0.0 and an update of this package was not requested.
    - drupal/responsive_media_image 1.0.0 requires drupal/media * -> found drupal/media[dev-1.x, 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require drupal/color:*" to figure out if any version is installable, or "composer require drupal/color:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
docker@cli:/var/www$

After adding that provide to the project composer.json, no problem to install:

   "provide": {
	    "drupal/media": "*"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
docker@cli:/var/www$ composer require drupal/color
Using version ^1.0 for drupal/color
./composer.json has been updated
Running composer update drupal/color
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking drupal/color (1.0.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Downloading drupal/color (1.0.2)
  - Installing drupal/color (1.0.2): Extracting archive
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
Generating autoload files
94 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
docker@cli:/var/www$ composer show -P drupal/color
drupal/color /var/www/web/modules/contrib/color
docker@cli:/var/www$