MartinJH
MartinJH

Reputation: 2609

Deploying laravel 5 with AWS EB cli: UnexpectedValueException - Invalid version string

So I was just about to deploy some changes for the first time in some months, and I get this error back:

  [UnexpectedValueException]                                                  
  Could not parse version constraint ^1.2.2: Invalid version string "^1.2.2" 

After some digging, I found the line in my composer.lock file:

{
    "_readme": [
        ...
    ],
    "hash": "NotTellingYou",
    "packages": [
        {
         ...
        },
         ....
        "require": {
                "nikic/php-parser": "^1.2.2",
                "php": ">=5.3.3",
                "symfony/console": "~2.1",
                "symfony/filesystem": "~2.1",
                "symfony/finder": "~2.1"
            },

But ehhh... How do I make the string the "correct" then? I know the newest version is 1.3, but is it okay for me to change that? Shouldn't it be automatic when running composer update?

Upvotes: 0

Views: 523

Answers (2)

Sven
Sven

Reputation: 70863

Update the Composer version you are using. The feature of using the ^ operator has been added in December 2014, so everyone should have gotten an updated copy of Composer by now

composer self-update

This is the key to prevent incompatibility issues. Note that Composer is still in development, and there are some alpha releases. Using it means to also update it regularly.

Upvotes: 1

lucidlogic
lucidlogic

Reputation: 1944

change "nikic/php-parser": "^1.2.2" to "nikic/php-parser": "1.*",

Upvotes: 0

Related Questions