So we can have a better composer integration in local workflows.

Comments

e0ipso created an issue. See original summary.

  • e0ipso authored 6172757 on 8.x-3.x
    Issue #3023071 by e0ipso: Add composer.json
    
e0ipso’s picture

Status: Active » Fixed
karlshea’s picture

drupal/environment_indicator 3.4.0 requires drupal/color ^5.3 -> no matching package found.

karolus’s picture

Version: 8.x-3.x-dev » 8.x-3.4
Status: Fixed » Needs work
Issue tags: +Composer, +update

Like @KarlShea noted above, I had this issue with the Color module requirement as well, and opened a ticket on this here.

komlenic’s picture

This breaks updating to the latest 3.4 version from 3.3:

composer update drupal/environment_indicator --with-dependencies
    1/1:	http://repo.packagist.org/p/provider-latest$a194d35766dd4af7068e6e683e557e6c564d02f2251432b8d28f3db10a6e647d.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Dependency "drupal/core" is also a root requirement, but is not explicitly whitelisted. Ignoring.
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
    - drupal/environment_indicator 3.4.0 requires drupal/color ^5.3 -> no matching package found.
    - drupal/environment_indicator 3.x-dev requires drupal/color ^5.3 -> no matching package found.
    - Installation request for drupal/environment_indicator ^3.4 -> satisfiable by drupal/environment_indicator[3.x-dev, 3.4.0].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
karolus’s picture

I'm about to head out, but will check this syntax in the composer.json file.

This is the current:

    "require": {
        "drupal/color": "^8.5.3"

If I recall correctly, under D8 naming conventions, would it not need to be:

    "require": {
        "drupal/color": "^5.3"

Or perhaps "^0.5.3"?

karlshea’s picture

Color is part of core, so I don't think you'd need it in composer.json at all right? Seems that should be in the info.yml file.

karolus’s picture

@KarlShea
That is a good point. I was checking out the composer.json of other contrib modules in my builds, and could find none that required core modules. Some would even have a blank require: { }.

karolus’s picture

OK. I have created a patch, and put in this issue.

karolus’s picture

karlshea’s picture

Status: Needs work » Fixed

Technically "fixed", follow-up at #3023179: Errors updating to 8.x-3.4

  • 49ebdde committed on 8.x-3.x
    Revert "Issue #3023071 by e0ipso: Add composer.json"
    
    This reverts...

Status: Fixed » Closed (fixed)

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