Problem/Motivation

This constraint is different from the one here.

This means that when using Drupal 9, composer require drupal/colorbox will install 2.1.1 but it is not really compatible with Drupal 9.

Steps to reproduce

composer require drupal/core:^9.0
composer require drupal/colorbox # This will install an incompatible version

Proposed resolution

You don't need to add a drupal/core dependency in composer.json. drupal.org will automatically add it when creating the Composer package (based on core_version_requirement).

Issue fork colorbox-3470667

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review
mjpa’s picture

Status: Needs review » Reviewed & tested by the community

Had the same issue and had to pin to a specific version in composer.json.

This fixes the issue and https://www.drupal.org/docs/develop/using-composer/add-a-composerjson-file recommends not having the core requirement.

I assume this won't stop composer bringing in 2.1.0 / 2.1.1 for D9 unless they're removed somehow and re-released?

paulmckibben’s picture

Status: Reviewed & tested by the community » Fixed

Thanks to you both for identifying and fixing this issue. This was just fixed in #3500053: Syntax error in 2.1.1 on D9/PHP7 - composer json allows install even though not supported.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.