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

Install failure with some versions of Composer 2 #2

Open
superterran opened this issue Nov 23, 2021 · 0 comments
Open

Install failure with some versions of Composer 2 #2

superterran opened this issue Nov 23, 2021 · 0 comments

Comments

@superterran
Copy link

We have a deployment image that installs composer2 from https://getcomposer.org/composer.phar before installation. The version that's currently installed is...

$ composer -v
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 2.1-dev (2.1-dev+d7154c2a72101b40c0f93daeea9b81dd484129c3) 2021-11-02 13:39:04

When I try to install Magento 2.4.3 from composer, the installation fails when I get to this dependency version verifier package with the following error:

$ composer install
...
  - Installing composer/ca-bundle (1.3.1): Extracting archive
  - Installing composer/composer (1.10.23): Extracting archive
  - Installing colinmollenhour/credis (1.11.1): Extracting archive
  - Installing colinmollenhour/php-redis-session-abstract (v1.4.4): Extracting archive
  - Installing magento/framework (103.0.3-p1): Extracting archive
  - Installing squizlabs/php_codesniffer (3.5.8): Extracting archive
  - Installing dealerdirect/phpcodesniffer-composer-installer (v0.7.1): Extracting archive
  - Installing magento/composer-dependency-version-audit-plugin (0.1.1): Extracting archive

                                 
  [Exception]                    
  Unrecognized Composer Version  
                                 

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-scripts] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>]...

I believe the issue is that the version parsing this module is performing isn't taking into account the -dev suffix in the version, and errors out as it cannot identify this composer version. Replacing composer with this version https://getcomposer.org/download/2.1.12/composer.phar which reports as Composer version 2.1.12 2021-11-09 16:02:04 allows me to complete the installation. I believe the logic here needs to match even with these version suffixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant