嗨,有任何人可以帮助我这个我无法更新作曲家我尝试删除composer.lock,我尝试过composer install,我试过作曲家更新所有我得到的是这个错误:
使用包信息加载作曲家存储库
[UnexpectedValueException]
Invalid version string ">=7.1.0"
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--
prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
这是我的composer.json文件:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"config": {
"platform": {
"php": ">=7.1.0"
},
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"require": {
"php": ">=5.6.4",
"barryvdh/laravel-debugbar": "^2.3",
"barryvdh/laravel-dompdf": "^0.8.1",
"brozot/laravel-fcm": "^1.2",
"doctrine/dbal": "^2.5",
"guzzlehttp/guzzle": "^6.2",
"intervention/image": "^2.3",
"laravel/framework": "5.5.*",
"laravel/passport": "^3.0",
"laravel/socialite": "^3.0",
"laravel/tinker": "~1.0",
"laravelcollective/html": "~5.0",
"braintree/braintree_php" : "3.23.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0",
"filp/whoops": "~2.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
}
}
任何人都可以帮助它不起作用的东西..
答案 0 :(得分:2)
在platform
配置中,您必须设置希望编写者使用的PHP的确切版本,而不是约束:
"platform": {
"php": "7.1.0"
},