Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer 1.10.11 chokes on constraints like "^2.0@dev" in unrelated projects #9191

Closed
flack opened this issue Sep 8, 2020 · 42 comments
Closed
Labels
Milestone

Comments

@flack
Copy link

flack commented Sep 8, 2020

My composer.json:

{
    "name": "openpsa/midcom",
    "type": "midcom-package",
    "description": "Content-oriented Model-View-Controller framework for PHP",
    "keywords": ["mvc", "midgard", "framework"],
    "homepage": "http://midgard-project.org/midcom/",
    "license": "LGPL-2.1-or-later",
    "authors": [
        {
            "name": "Andreas Flack",
            "email": "flack@contentcontrol-berlin.de",
            "homepage": "http://www.contentcontrol-berlin.de/"
        },
        {
            "name": "Henri Bergius",
            "email": "henri.bergius@iki.fi",
            "homepage": "http://bergie.iki.fi/"
        }
    ],
    "require": {
        "php": ">=7.1.3",
        "ext-mbstring": "*",
        "ext-iconv": "*",
        "checkdomain/holiday": "^3.0.0",
        "doctrine/cache": "^1.6.0",
        "gregwar/captcha": "^1.0",
        "guzzlehttp/guzzle": "^6.3",
        "mf2/mf2": ">=0.2.12",
        "michelf/php-markdown": "^1.9.0",
        "monolog/monolog": "^1.9.1",
        "openpsa/installer": "^1.0",
        "openpsa/midgard-portable": "^1.4.0",
        "openpsa/ranger": ">=0.3.0",
        "openpsa/universalfeedcreator": "^1.8.2",
        "phpspec/php-diff": "^1.1.0",
        "sabre/vobject" : "^4.3.0",
        "simplepie/simplepie": "^1.5.4",
        "studio-42/elfinder": "> 2.1.42",
        "swiftmailer/swiftmailer": "^6.2",
        "symfony/config": ">=4.4",
        "symfony/console" : ">=2.6.0",
        "symfony/css-selector": ">=4.4",
        "symfony/dependency-injection": ">=4.4",
        "symfony/dom-crawler": ">=4.4",
        "symfony/event-dispatcher": ">=4.4",
        "symfony/finder": ">=4.4",
        "symfony/form": ">=4.4",
        "symfony/http-foundation": ">=4.4",
        "symfony/intl": ">=4.4",
        "symfony/mime": ">=4.4",
        "symfony/options-resolver": ">=4.4",
        "symfony/routing": ">=4.4",
        "symfony/security-csrf": ">=4.4",
        "symfony/translation": ">=4.4",
        "symfony/validator": ">=4.4",
        "symfony/var-dumper": ">=4.4",
        "symfony/yaml": ">=4.4",
        "symfony/http-kernel": ">=4.4",
        "cocur/slugify": "^4.0"
    },
    "conflict": {
        "symfony/form": "4.4.9 || 5.0.9 || 5.1.0"
    },
    "scripts": {
        "post-install-cmd": [
            "openpsa\\installer\\installer::setup_root_package"
        ],
        "post-update-cmd": [
            "openpsa\\installer\\installer::setup_root_package"
        ]
    },
    "prefer-stable": true,
    "minimum-stability": "dev",
    "suggest": {
        "ezyang/htmlpurifier": "^4.7"
    },
    "provide": {
        "midgard/midcom": "*",
        "openpsa/openpsa": "*"
    },
    "extra": {
        "branch-alias": {
            "dev-master": "9.7.x-dev"
        }
    },
    "bin" : [
        "bin/midcom"
    ],
    "autoload": {
        "classmap": ["lib"],
        "psr-0": {
            "openpsa": "src/",
            "midcom": "src/"
        },
        "files": ["lib/constants.php", "lib/compat/ragnaroek.php"]
    },
    "autoload-dev": {
        "classmap": ["test"]
    },
    "require-dev": {
        "phpunit/phpunit": "^7.5.15 || ^8.5.8"
    }
}

Output of composer diagnose:

Checking composer.json: WARNING
require.mf2/mf2 : unbound version constraints (>=0.2.12) should be avoided
require.openpsa/ranger : unbound version constraints (>=0.3.0) should be avoided
require.studio-42/elfinder : unbound version constraints (> 2.1.42) should be avoided
require.symfony/config : unbound version constraints (>=4.4) should be avoided
require.symfony/console : unbound version constraints (>=2.6.0) should be avoided
require.symfony/css-selector : unbound version constraints (>=4.4) should be avoided
require.symfony/dependency-injection : unbound version constraints (>=4.4) should be avoided
require.symfony/dom-crawler : unbound version constraints (>=4.4) should be avoided
require.symfony/event-dispatcher : unbound version constraints (>=4.4) should be avoided
require.symfony/finder : unbound version constraints (>=4.4) should be avoided
require.symfony/form : unbound version constraints (>=4.4) should be avoided
require.symfony/http-foundation : unbound version constraints (>=4.4) should be avoided
require.symfony/intl : unbound version constraints (>=4.4) should be avoided
require.symfony/mime : unbound version constraints (>=4.4) should be avoided
require.symfony/options-resolver : unbound version constraints (>=4.4) should be avoided
require.symfony/routing : unbound version constraints (>=4.4) should be avoided
require.symfony/security-csrf : unbound version constraints (>=4.4) should be avoided
require.symfony/translation : unbound version constraints (>=4.4) should be avoided
require.symfony/validator : unbound version constraints (>=4.4) should be avoided
require.symfony/var-dumper : unbound version constraints (>=4.4) should be avoided
require.symfony/yaml : unbound version constraints (>=4.4) should be avoided
require.symfony/http-kernel : unbound version constraints (>=4.4) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.10.11
PHP version: 7.4.9
PHP binary path: /usr/local/Cellar/php/7.4.9/bin/php
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020

When I run this command:

composer update

I get the following output:

Loading composer repositories with package information
Updating dependencies (including require-dev)

                                                                                                                                                            
  [RuntimeException]                                                                                                                                        
  Could not load package ezsystems/ezplatform in http://repo.packagist.org: [UnexpectedValueException] Could not parse version constraint dev-load-varnish  
  -only-when-used as ^2.0@dev: Invalid version string "^2.0@dev"                                                                                            
                                                                                                                                                            

                                                                                                                     
  [UnexpectedValueException]                                                                                         
  Could not parse version constraint dev-load-varnish-only-when-used as ^2.0@dev: Invalid version string "^2.0@dev"  
                                                                                                                     

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

And I expected this to happen:

It works fine with all prior versions. A rollback to 1.10.10 makes the error go away

@jrfnl
Copy link
Contributor

jrfnl commented Sep 8, 2020

I can confirm this error and it is breaking builds running on Travis: https://travis-ci.com/github/WordPress/WordPress-Coding-Standards/jobs/382426532

@yyss8
Copy link

yyss8 commented Sep 8, 2020

I'm also having this issue on our travis/local environments using 1.10.11.

@jrfnl
Copy link
Contributor

jrfnl commented Sep 8, 2020

Just in case it helps, the much smaller composer.json config for WPCS:

{
	"name": "wp-coding-standards/wpcs",
	"type": "phpcodesniffer-standard",
	"require": {
		"php": ">=5.4",
		"squizlabs/php_codesniffer": "^3.5.0",
		"phpcsstandards/phpcsutils": "^1.0",
		"phpcsstandards/phpcsextra": "^1.0"
	},
	"require-dev": {
		"phpcompatibility/php-compatibility": "^9.0",
		"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0",
		"phpcsstandards/phpcsdevtools": "^1.0",
		"php-parallel-lint/php-parallel-lint": "^1.0",
		"php-parallel-lint/php-console-highlighter": "^0.5"
	},
	"minimum-stability": "dev",
	"prefer-stable": true
}

The ezsystems/ezplatform package is not our dependency either, nor a dependency of any of our dependencies.

# composer info

Composer version 1.10.10 2020-08-03 11:35:19

dealerdirect/phpcodesniffer-composer-installer v0.7.0       PHP_CodeSniffer Standards Composer Installer Plugin
doctrine/instantiator                          1.3.1        A small, lightweight utility to instantiate objects in PHP without invoking their construc...
myclabs/deep-copy                              1.10.1       Create deep copies (clones) of your objects
phar-io/manifest                               1.0.3        Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version                                2.0.1        Library for handling version information and constraints
php-parallel-lint/php-console-color            v0.3
php-parallel-lint/php-console-highlighter      v0.5         Highlight PHP code in terminal
php-parallel-lint/php-parallel-lint            v1.2.0       This tool check syntax of PHP files about 20x faster than serial check.
phpcompatibility/php-compatibility             9.3.5        A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.
phpcsstandards/phpcsdevtools                   1.0.1        Tools for PHP_CodeSniffer sniff developers.
phpcsstandards/phpcsextra                      1.0.0-alpha3 A collection of sniffs and standards for use with PHP_CodeSniffer.
phpcsstandards/phpcsutils                      1.0.0-alpha3 A suite of utility functions for use with PHP_CodeSniffer
phpdocumentor/reflection-common                2.2.0        Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock              5.2.1        With this component, a library can provide support for annotations via DocBlocks or otherw...
phpdocumentor/type-resolver                    1.3.0        A PSR-5 based resolver of Class names, Types and Structural Element Names
phpspec/prophecy                               1.11.1       Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage                      6.1.4        Library that provides collection, processing, and rendering functionality for PHP code cov...
phpunit/php-file-iterator                      2.0.2        FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template                      1.2.1        Simple template engine.
phpunit/php-timer                              2.1.2        Utility class for timing
phpunit/php-token-stream                       3.1.1        Wrapper around PHP's tokenizer extension.
phpunit/phpunit                                7.5.20       The PHP Unit Testing framework.
sebastian/code-unit-reverse-lookup             1.0.1        Looks up which function or method a line of code belongs to
sebastian/comparator                           3.0.2        Provides the functionality to compare PHP values for equality
sebastian/diff                                 3.0.2        Diff implementation
sebastian/environment                          4.2.3        Provides functionality to handle HHVM/PHP environments
sebastian/exporter                             3.1.2        Provides the functionality to export PHP variables for visualization
sebastian/global-state                         2.0.0        Snapshotting of global state
sebastian/object-enumerator                    3.0.3        Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector                     1.1.1        Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context                    3.0.0        Provides functionality to recursively process PHP variables
sebastian/resource-operations                  2.0.1        Provides a list of PHP built-in functions that operate on resources
sebastian/version                              2.0.1        Library that helps with managing the version number of Git-hosted PHP projects
squizlabs/php_codesniffer                      3.5.6        PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a define...
symfony/polyfill-ctype                         v1.18.1      Symfony polyfill for ctype functions
theseer/tokenizer                              1.2.0        A small library for converting tokenized PHP source code into XML and potentially other fo...
webmozart/assert                               1.9.1        Assertions to validate method input/output with nice error messages.

@flack
Copy link
Author

flack commented Sep 8, 2020

maybe related to this?

composer/semver@07ed0f4

jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this issue Sep 8, 2020
... as there is an issue with Composer 1.10.11, which prevents the `install` from working.

For more information:
composer/composer#9191
@flack flack changed the title Breakage in 1.10.11 ezsystems/ezplatform breaks (all?) composer installs in 1.10.11 Sep 8, 2020
@flack
Copy link
Author

flack commented Sep 8, 2020

I also don't have ezsystems/ezplatform installed. Seems to be some general parse error when composer gets data from packagist?

@jrfnl
Copy link
Contributor

jrfnl commented Sep 8, 2020

Hmm.. interesting.. it's not happening for all projects though...

A build for a project which has nearly the same dependency setup as WPCS, just passed: https://travis-ci.com/github/PHPCompatibility/PHPCompatibility/jobs/382442079

{
  "name" : "phpcompatibility/php-compatibility",
  "description" : "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
  "require" : {
    "php" : ">=5.4",
    "squizlabs/php_codesniffer" : "^2.6 || ^3.1.0",
    "phpcsstandards/phpcsutils" : "^1.0 || dev-develop"
  },
  "require-dev" : {
    "php-parallel-lint/php-parallel-lint": "^1.2.0",
    "php-parallel-lint/php-console-highlighter": "^0.5",
    "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || >=9.0 <9.3.0",
    "phpcsstandards/phpcsdevtools": "^1.0"
  }
}

The only real differences are:

  • PHPCompatibility allows a wider range of versions for PHPCS and PHPUnit
  • PHPCompatibility does not have a dependency on PHPCSExtra.
  • WPCS require-devs PHPCompatibility.

@flack flack changed the title ezsystems/ezplatform breaks (all?) composer installs in 1.10.11 Composer 1.10.11 chokes on constraints like "^2.0@dev" in unrelated projects Sep 8, 2020
@flack
Copy link
Author

flack commented Sep 8, 2020

just installed composer locally in my project and can confirm that the issue goes away when I downgrade composer/semver to 1.5.1. Opening an issue there

@flack
Copy link
Author

flack commented Sep 8, 2020

looks like someone already did: composer/semver/issues/107

@flack
Copy link
Author

flack commented Sep 8, 2020

Regardless of the actual parser bug, it would be nice if composer could simply ignore entries with parse errors instead of refusing to work at all

@yyss8
Copy link

yyss8 commented Sep 8, 2020

just installed composer locally in my project and can confirm that the issue goes away when I downgrade composer/semver to 1.5.1. Opening an issue there

I already have version 1.5.1 installed in my project and I'm still seeing the error. There might some other dependencies being downgraded together with composer/semver perhaps?

image

@thiagolcks
Copy link

Same happening here trying to install Laravel.

@tpaskett
Copy link

tpaskett commented Sep 8, 2020

our builds are failing too:

Updating dependencies (including require-dev)
[RuntimeException]
Could not load package kylekatarnls/update-helper in http://repo.packagist.org: [UnexpectedValueException] Could not parse version constraint ^2.0.x-dev: Invalid version string "^2.0.x-dev"
[UnexpectedValueException]
Could not parse version constraint ^2.0.x-dev: Invalid version string "^2.0.x-dev"

@Seldaek
Copy link
Member

Seldaek commented Sep 8, 2020

Thanks for the reports and sorry for the trouble. I'm taking a look and will try to release a patch soon.

@jrfnl
Copy link
Contributor

jrfnl commented Sep 8, 2020

Thank you @Seldaek, much appreciated! ❤️ Please let us know if there is any more information you need.

@chrisShick
Copy link

@Seldaek this issue also appears in cakephp as well: cakephp/app#807

@ayoob-lfc
Copy link

ayoob-lfc commented Sep 8, 2020

A temporary fix for broken builds is to make the following setting in your pipelines:

composer self-update 1.10.10

@mohammadzo
Copy link

mohammadzo commented Sep 8, 2020

I believe this is a composer issue. I have created a clean composer.json only with two projects and removed composer.lock and vendor then ran composer install. I am getting the same error.

"repositories": {
        "drupal": {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        "asset-packagist": {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    },
    "require": {
        "composer/installers": "^1.2.0",
        "drupal/core": "^8.9"
    },

Also I grep for ezplatform in my project and here is the result:

./vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:        'meta-assets' => 'web/assets/ezplatform/',
./vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:        'assets' => 'web/assets/ezplatform/{$name}/',
./vendor/composer/installers/src/Composer/Installers/Installer.php:        'ezplatform'   => 'EzPlatformInstaller',

@gordonbanderson
Copy link

@ayoob-lfc #9191 (comment) resolved my issues, with a SilverStripe module. This is another +1 to this being a composer issue

tvbeek added a commit to TJVB/laravel-mail-catchall that referenced this issue Sep 8, 2020
@TomasVotruba
Copy link

Update to 1.10.12 fixes it 🎉

sudo composer self-update --1
# Updating to version 1.10.12 (1 channel).
#    Downloading (100%)         
# Use composer self-update --rollback to return to version 1.10.11

@Seldaek Thank your such fast work so late after full day 👍 👏

@jrfnl
Copy link
Contributor

jrfnl commented Sep 8, 2020

Sleep well @Seldaek and thank you for the fast turn-around!

@jrfnl
Copy link
Contributor

jrfnl commented Sep 8, 2020

I assume there might be some issues left that I missed, the potential for obscure broken constraints is always there, but at least this should get the bulk of the problems resolved so there's hopefully no urgent problem anymore.

Found one of those. No rush though. Follow up issue with the details: composer/semver#109

@dereuromark
Copy link
Contributor

It doesnt look like .12 fixes it yet:
https://travis-ci.com/github/cakephp/migrations/jobs/382510131

$ composer --version
Composer version 1.10.12 2020-09-08 22:58:51
11.99s$ if [[ $PREFER_LOWEST != 1 ]]; then composer install --no-interaction; fi
Loading composer repositories with package information
Updating dependencies (including require-dev)
                                                                               
  [RuntimeException]                                                           
  Could not load package cakephp/bake in http://repo.packagist.org: [Unexpect  
  edValueException] Could not parse version constraint 3.next-dev as 3.5.0: I  
  nvalid version string "3.next-dev as 3.5.0" in "3.next-dev as 3.5.0", the a  
  lias source must be an exact version, if it is a branch name you should pre  
  fix it with dev-                                                             
                                                                               
                                                                               
  [UnexpectedValueException]                                                   
  Could not parse version constraint 3.next-dev as 3.5.0: Invalid version str  
  ing "3.next-dev as 3.5.0" in "3.next-dev as 3.5.0", the alias source must b  
  e an exact version, if it is a branch name you should prefix it with dev-    
                                                                               

@dan2k3k4
Copy link

dan2k3k4 commented Sep 9, 2020

Running composer update --lock with composer version 1.10.10, runs through just fine.

Running composer update --lock with composer version 1.10.12, I still get an error:

[Composer\Repository\InvalidRepositoryException]
A repository of type "package" contains an invalid package definition: Invalid package information:
version : invalid value (dev): Invalid version string "dev"

Invalid package definition:
{"name":"drupal/graphql_twig","version":"dev","type":"drupal-module","source":{"type":"git","url":"https://github.com/drupal-graphql/graphql-twig.git","reference":"8.x-1.x"}}

Then I updated the package definition from dev to dev-testing in my composer.json file:

             "type":"package",
             "package": {
                 "name": "drupal/graphql_twig",
-                "version": "dev",
+                "version": "dev-testing",
                 "type": "drupal-module",
                 "source": {
                     "type": "git",

and ran composer update --lock again (on composer version 1.10.12) and it ran through fine.

I'm not so sure how package.version is used, but reading through versions.md#branches, I presume if I wanted to get latest dev branch, then it would be dev-dev. Although the composer.lock file only changed the content-hash and nothing else so I assume it should still be installing the defined version in the require line for that package.

@Seldaek
Copy link
Member

Seldaek commented Sep 9, 2020

@dereuromark your issue is dupe of composer/semver#110 and has a fix already lined up.

@dan2k3k4 yes version dev is invalid, it just happened to work before and got normalized as dev- internally, which is really kinda meaningless. I don't see how to reasonably fix this into a proper version tbh. You could use dev-dev I suppose, for a branch called dev, but this applies to vcs repos. If you define a package inline like this you have much more freedom but also freedom to shoot yourself in the foot :)

@Seldaek
Copy link
Member

Seldaek commented Sep 9, 2020

Alright 1.10.13 is now out with all the latest fixes.. I ran the version parser on all constraints from packagist.org and it's passing everything except dev in a few old package versions which will have to go. So I am now fairly confident the issue should be resolved for everyone.

@kdambekalns
Copy link
Contributor

Too bad the official docker image is currently stuck at 1.10.12 still… 😢

Thanks for keeping it updated ❤️, but if it would be built automagically on a new release, that'd be most awesome! 🚀

robertlemke added a commit to flownative/docker-composer that referenced this issue Sep 10, 2020
Hotfix for composer/composer#9191
because 1.10.13 of the official Composer image is not yet available.
@derrabus
Copy link
Contributor

@kdambekalns The updated image should be on its way: composer/docker@aace872

@kdambekalns
Copy link
Contributor

@kdambekalns The updated image should be on its way: composer/docker@aace872

Great! But… the 1.10.12 image was built 12 hours ago, but that commit for 1.10.13 was done 22 hours ago. 🤔

@derrabus
Copy link
Contributor

Strange indeed. Maybe @alcohol knows more?

@podarok
Copy link

podarok commented Sep 11, 2020

1.10.13 Still failing for some of Drupal packages https://www.drupal.org/project/recaptcha/issues/3169913
Why Exception???? Let's show warning and continue to proceed

@Seldaek
Copy link
Member

Seldaek commented Sep 11, 2020

@podarok see #9196 (comment) and #9195 for answers to your two points. You can use composer self-update 1.10.10 for now as a workaround.

@podarok
Copy link

podarok commented Sep 11, 2020

@Seldaek interesting and not funny. There are no answers.

I see here reactive police from the composer team, but proactive should be preferred.

Let's make a change, see what is failing and fix failed parts -< this is now
Instead of
Let's announce this is coming, add a bypass in the current version for those who can't do a quick turnaround and do release this in the next major version. <- this is desired

Using composer self-update 1.10.10 is not always possible, especially when you have a huge infrastructure. Suggesting a workaround to users when there is a dependency from systems you have no controls about - bad practice. Closing all issues here just because there are admin rights - not funny.

@Seldaek
Copy link
Member

Seldaek commented Sep 11, 2020

@ryanaslett @drumm Might have answers/a status update on the Drupal repo situation. I'd definitely like to hear what is going on there to make a more informed decision. If they are about to resolve the issue it's not worth working around it on our end IMO.

@jcnventura
Copy link

I think the goal should be to have a robust composer that doesn't require changes from the Drupal repo side.

Even if those changes should indeed be made.

@stof
Copy link
Contributor

stof commented Sep 11, 2020

@jcnventura the issue in that case is that the drupal repository contains invalid metadata. The error being thrown is precisely coming from making Composer more robust by better detecting broken metadata rather than trating them in a garbage way with undefined result.

@jcnventura
Copy link

jcnventura commented Sep 14, 2020

Yes, but this is broken metadata introduced 4 years ago to the package (https://git.drupalcode.org/project/recaptcha/-/commit/00989c480bbab4b40253887e2e3d34bbe14dfe4a), and fixed 13 days later (https://git.drupalcode.org/project/recaptcha/-/commit/5aba53503d75500d7b12ac4945d86b9a7eaaf88f).

What composer is now asking is that the project history be altered so that this wrong composer.json is fixed, when there have been multiple later packages that have valid composer.json files. I think that composer should indeed complain about broken composer.json files, but not break every install that requires an older package with broken composer.json. Maybe just totally ignore packages that have broken composer.json files and not allow them to be installed, but be perfectly fine with other versions of the same package that have valid composer.json files?

@ryanaslett
Copy link
Contributor

Validity of the metadata was defined by what was implemented in the code. Changing composer to be more robust and detect those invalid, yet, previously acceptable situations is a BC break. BC breaks are fine, but hopefully would follow the typical deprecation/warning in the current version -> error in the next Major version.

packages.drupal.org has been updated to fix this for recaptcha, and we'll be re-building all of our metadata to ensure that there are not other projects that we serve with formerly valid, now invalid metadata.

@alcohol
Copy link
Member

alcohol commented Sep 16, 2020

@kdambekalns The updated image should be on its way: composer/docker@aace872

Great! But… the 1.10.12 image was built 12 hours ago, but that commit for 1.10.13 was done 22 hours ago. 🤔

A tag on the composer/composer repository takes a while to propagate to the docker-library/official-images repository and result in an actual container being built on the build machines. The following roughly outlines the process:

  • tag composer/composer
  • update composer/docker
  • submit PR to docker-library/official-images
  • once PR is merged, build servers create image/container

As you can imagine, the lag introduced here could range between several hours and even a few days, since there are some manual steps involved and this is a FOSS project after all.

kdambekalns added a commit to flownative/docker-composer that referenced this issue Oct 9, 2020
Undo the hotfix for composer/composer#9191
because 1.10.13 of the official Composer image is now available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests