gpt4 book ai didi

php - 无法将 Laravel 5.4 更新到 5.5 Composer

转载 作者:行者123 更新时间:2023-12-02 03:49:03 24 4
gpt4 key购买 nike

当我尝试从 5.4 更新 Laravel 5.5 时,显示错误。

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0",
"intervention/image": "^2.4",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.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"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}

这是我的composer.json 文件。当我使用命令composer update时,这是显示的。

Problem 1
- This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement.
Problem 2
- Installation request for laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0].
- laravel/framework v5.5.0 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
Problem 3
- phpunit/phpunit 6.3.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.4 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.3 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.2 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.1 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.2.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.4 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.3 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.2 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.1 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.1.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.9 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.8 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.7 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.6 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.5 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.4 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.3 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.2 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.13 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.12 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.11 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.10 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.1 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- phpunit/phpunit 6.0.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
- Installation request for phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, 6.0.1, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.
2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.3.0].

我的 PHP 版本是 7.0.10,我使用 wamp。

最佳答案

您的 PHP 版本是 5.6

This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement.

因此,将您的 PHP 版本更改为 PHP 7.0 并运行:

composer install

关于php - 无法将 Laravel 5.4 更新到 5.5 Composer ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45986411/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com