gpt4 book ai didi

laravel - 将 Laravel 从 Laravel 5.4 更新到 Laravel 5.5

转载 作者:行者123 更新时间:2023-12-02 20:55:06 32 4
gpt4 key购买 nike

我正在尝试将 laravel 从 5.4 版本更新到 5.5。我已经按照 Laravel 指南的指示完成了所有操作: https://laravel.com/docs/master/upgrade

当我尝试使用命令时:

composer update

结果是:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package laravel/framework 5.5.* is satisfiable by laravel/framework[5.5.x-dev] but these conflict with your requirements or minimum-stability.

下面我展示了composer.json文件:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"doctrine/dbal": "^2.5",
"intervention/image": "^2.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.4.0",
"unisharp/laravel-filemanager": "^1.7"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"artSite\\": "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
}
}

如果您能提供帮助,我将不胜感激。最好的问候

最佳答案

如错误消息中所述,Laravel 5.5 仍处于开发阶段,这意味着没有稳定的版本,并且默认情况下 Composer 限制您只能下载稳定编号的版本,以避免您下载任何正在积极开发且可能包含重大更改的软件包。

您可以通过将以下两行添加到您的 composer.json 文件中来规避此问题

"minimum-stability": "dev",
"prefer-stable": true,

这样,它更喜欢任何可以找到稳定版本的地方,但如果没有其他可用的东西,它将允许您下载dev包。

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

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