-
-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Description
Composer is unable to install google-closure-compiler package with the composer-asset-plugin due to a version number parsing issue. I found the actual issue to be in Composer's SemVer component, but it seems they're reluctant to change it (see composer/semver#32). So here goes in case there's something that could be done in composer-asset-plugin to remedy the issue.
Here's a minimal composer.json to reproduce the problem:
{
"require": {
"npm-asset/google-closure-compiler": "20150920.0.0"
}
}
composer -vvv update output:
composer -vvv update
Reading ./composer.json
Loading config file /Users/ere/.composer/config.json
Loading config file /Users/ere/.composer/auth.json
Loading config file ./composer.json
Executing command (/Users/ere/src/composertest): git describe --exact-match --tags
Executing command (/Users/ere/src/composertest): git branch --no-color --no-abbrev -v
Executing command (/Users/ere/src/composertest): hg branch
Executing command (/Users/ere/src/composertest): svn info --xml
Reading ./composer.json
Loading config file /Users/ere/.composer/config.json
Loading config file /Users/ere/.composer/auth.json
Loading config file ./composer.json
Executing command (/Users/ere/src/composertest): git describe --exact-match --tags
Executing command (/Users/ere/src/composertest): git branch --no-color --no-abbrev -v
Executing command (/Users/ere/src/composertest): hg branch
Executing command (/Users/ere/src/composertest): svn info --xml
[UnexpectedValueException]
Could not parse version constraint 20150920.0.0: Invalid version string "20150920.0.0"
Exception trace:
() at phar:///usr/local/bin/composer/vendor/composer/semver/src/VersionParser.php:467
Composer\Semver\VersionParser->parseConstraint() at phar:///usr/local/bin/composer/vendor/composer/semver/src/VersionParser.php:248
Composer\Semver\VersionParser->parseConstraints() at phar:///usr/local/bin/composer/src/Composer/Package/Loader/ArrayLoader.php:234
Composer\Package\Loader\ArrayLoader->parseLinks() at phar:///usr/local/bin/composer/src/Composer/Package/Loader/ArrayLoader.php:124
Composer\Package\Loader\ArrayLoader->load() at phar:///usr/local/bin/composer/src/Composer/Package/Loader/RootPackageLoader.php:86
Composer\Package\Loader\RootPackageLoader->load() at phar:///usr/local/bin/composer/src/Composer/Factory.php:284
Composer\Factory->createComposer() at phar:///usr/local/bin/composer/src/Composer/Factory.php:504
Composer\Factory::create() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:245
Composer\Console\Application->getComposer() at phar:///usr/local/bin/composer/src/Composer/Command/Command.php:53
Composer\Command\Command->getComposer() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:88
Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:259
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:841
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:167
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:98
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
require() at /usr/local/bin/composer:25
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--] [<packages>]...
cmoeke