Problem/Motivation

We currently ship with composer 1.0.0, which is pretty dated, and causes version parsing problems with modern packages.

Example:

[UnexpectedValueException]
Could not parse version constraint ^v1.0: Invalid version string "^v1.0"

Proposed resolution

Currently the way to work around this is to edit the composer.json yourself and update. However there is no reason that I know to stay on 1.0.0, so let's use the latest version 1.7.3 so users do not need to struggle with this when they install.

CommentFileSizeAuthor
#6 3013044-6.patch7.11 MBsuzymasri
#2 3013044-2.patch6.74 MBManuel Garcia
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Manuel Garcia created an issue. See original summary.

Manuel Garcia’s picture

Status: Active » Needs review
FileSize
6.74 MB
jribeiro’s picture

Status: Needs review » Reviewed & tested by the community

+1 RTBC

geoffreyr’s picture

+1. I've hit issues with other packages by being stuck on 1.0.0, because of its out of date version constraint parsing. The sooner the version of Composer bundled with this gets bumped, the better.
Might also put in a patch to bump to 1.8.0.

bburg’s picture

+1 RTBC.

Yes, and it doesn't seem that the extension without this patch will run in PHP 7.

$ f1 drush composer-manager install
WD php: TypeError: Argument 1 passed to Symfony\Component\Console\Formatter\OutputFormatter::__construct() must be of       [error]
the type boolean, null given, called in
/var/www/html/vendor/drush/drush/commands/composer/vendor/composer/composer/src/Composer/Console/Application.php on line
95 in Symfony\Component\Console\Formatter\OutputFormatter->__construct() (line 69 of
/var/www/html/composer-manager/vendor/symfony/console/Formatter/OutputFormatter.php).
TypeError: Argument 1 passed to Symfony\Component\Console\Formatter\OutputFormatter::__construct() must be of the type boolean, null given, called in /var/www/html/vendor/drush/drush/commands/composer/vendor/composer/composer/src/Composer/Console/Application.php on line 95 in Symfony\Component\Console\Formatter\OutputFormatter->__construct() (line 69 of /var/www/html/composer-manager/vendor/symfony/console/Formatter/OutputFormatter.php).
suzymasri’s picture

FileSize
7.11 MB

Patch to upgrade Composer to 1.9.3, which is currently the latest stable release.

suzymasri’s picture

Title: Update composer to 1.7.3 » Update composer to 1.9.3
Status: Reviewed & tested by the community » Needs review
RobLoach’s picture

Thanks so much, all!

Applied the patch, and had some issues with the binary files. Ended up touching the patch a bit, and re-installing the dependencies. Let me know if this commit is good:
https://git.drupalcode.org/project/composer/-/commit/b63117119b7955ffe2f...

I've also added suzy and tim as maintainers. Feel free to push any patches forwards you find appropriate!

  • RobLoach committed b631171 on 8.x-1.x authored by suzymasri
    Issue #3013044 by Manuel Garcia, suzymasri: Update composer to 1.9.3
    
Manuel Garcia’s picture

fantastic news, thanks all!