vendredi 17 février 2017

Composer error: UnexpectedValueException

My composer suddenly stopped working. I didn't even add new packages, just wanted to check, if there are any updates:

PS C:\data\www\project.dev> composer self-update
You are already using composer version 1.3.2 (stable channel).

PS C:\data\www\project.dev> composer update
> php artisan clear-compiled
The compiled class file has been removed.
Loading composer repositories with package information
Updating dependencies (including require-dev)

  [UnexpectedValueException]
  Could not parse version constraint >=~2: Invalid version string "~2"


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]...

All solutions I found so far suggested to update composer and check the composer.json, but there shouldn't nu anything wrong in there:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.3.*",
        "edofre/laravel-fullcalendar-scheduler": "^1.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "5.0",
        "symfony/css-selector": "2.8.*|3.0.*",
        "symfony/dom-crawler": "2.8.*|3.0.*"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "pre-update-cmd": [
            "php artisan clear-compiled"
        ],
        "post-update-cmd": [
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

As you can see, there is nothing special in there.

PS: Of course, I already chkecked this and this, but those are unrelated problems.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kZInC7
via IFTTT

Aucun commentaire:

Enregistrer un commentaire