UnexpectedValueException Unable to parse version constraint ^ 1.0.2: Invalid version string "^ 1.0.2"

The composer gives the following error:

Could not load package phpspec/prophecy in http://packagist.org: [UnexpectedValueException] Could not parse version constraint ^1.0.2: Invalid version string "^1.0.2" 
+7
composer-php satis
source share
2 answers

Composer added the ability to use a carriage operator in early December 2014. Updating Composer will fix this problem - it's quite common because everyone uses PHPUnit, and PHPUnit started using this operator at the end of January 2015.

+6
source share

Found this post on github: https://github.com/phpspec/prophecy/commit/f802af851cc983d0ed074d29cba14af6766a24b1

What says:

Update your composer version.

I just checked https://github.com/composer/satis and satis infact uses a composer version that supports this new syntax, so you should use the old satis version.

- GrahamCampbell added a note 19 days ago

Try updating the composer (and satis if you use it)


In addition, the following is reported here: https://github.com/composer/satis/issues/200

-2
source share

All Articles