我正在尝试将laravel项目框架从5.5升级到5.7,但无法执行..
当我将composerjson要求更改为laravel升级文档并在项目终端上命中 composer update 时,这些输出将输出给我:
composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
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
- Conclusion: don't install laravel/framework v5.6.39
- Conclusion: don't install laravel/framework v5.6.38
- Conclusion: don't install laravel/framework v5.6.37
- Conclusion: don't install laravel/framework v5.6.36
- Conclusion: don't install laravel/framework v5.6.35
- Conclusion: don't install laravel/framework v5.6.34
- Conclusion: don't install laravel/framework v5.6.33
- Conclusion: don't install laravel/framework v5.6.32
- Conclusion: don't install laravel/framework v5.6.31
- Conclusion: don't install laravel/framework v5.6.30
- Conclusion: don't install laravel/framework v5.6.29
- Conclusion: don't install laravel/framework v5.6.28
- Conclusion: don't install laravel/framework v5.6.27
- Conclusion: don't install laravel/framework v5.6.26
- Conclusion: don't install laravel/framework v5.6.25
- Conclusion: don't install laravel/framework v5.6.24
- Conclusion: don't install laravel/framework v5.6.23
- Conclusion: don't install laravel/framework v5.6.22
- Conclusion: don't install laravel/framework v5.6.21
- Conclusion: don't install laravel/framework v5.6.20
- Conclusion: don't install laravel/framework v5.6.19
- Conclusion: don't install laravel/framework v5.6.18
- Conclusion: don't install laravel/framework v5.6.17
- Conclusion: don't install laravel/framework v5.6.16
- Conclusion: don't install laravel/framework v5.6.15
- Conclusion: don't install laravel/framework v5.6.14
- Conclusion: don't install laravel/framework v5.6.13
- Conclusion: don't install laravel/framework v5.6.12
- Conclusion: don't install laravel/framework v5.6.11
- Conclusion: don't install laravel/framework v5.6.10
- Conclusion: don't install laravel/framework v5.6.9
- Conclusion: don't install laravel/framework v5.6.8
- Conclusion: don't install laravel/framework v5.6.7
- Conclusion: don't install laravel/framework v5.6.6
- Conclusion: don't install laravel/framework v5.6.5
- Conclusion: don't install laravel/framework v5.6.4
- Conclusion: don't install laravel/framework v5.6.3
- Conclusion: don't install laravel/framework v5.6.2
- Conclusion: don't install laravel/framework v5.6.1
- cartalyst/stripe-laravel v7.0.0 requires illuminate/support 5.5.* -> satisfiable by laravel/framework[v5.5.45], illuminate/support[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44].
- cartalyst/stripe-laravel v7.0.0 requires illuminate/support 5.5.* -> satisfiable by laravel/framework[v5.5.45], illuminate/support[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44].
- Can only install one of: laravel/framework[v5.6.0, v5.5.45].
- don't install illuminate/support v5.5.0|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.16|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.17|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.2|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.28|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.33|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.34|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.35|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.36|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.37|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.39|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.40|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.41|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.43|don't install laravel/framework v5.6.0
- don't install illuminate/support v5.5.44|don't install laravel/framework v5.6.0
- Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.18, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].
- Installation request for cartalyst/stripe-laravel 7.0.* -> satisfiable by cartalyst/stripe-laravel[v7.0.0].
这是我的composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"laravel/framework": "5.6.*",
"cartalyst/stripe-laravel": "7.0.*",
"spatie/laravel-activitylog": "^2.1.1",
"yajra/laravel-datatables-oracle": "~8.0",
"arcanedev/no-captcha": "^5.0"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~7.0",
"barryvdh/laravel-debugbar": "^3.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"App\\Helpers\\": "app/Helpers/"
},
"files": ["app/Helpers/functions.php"]
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"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"
}
}
尝试了Internet上可用的多种方法,但仍然存在问题
只想为新功能升级项目laravel ..
有人知道吗?我该如何解决这个问题并继续使用新的laravel?
提前谢谢。
答案 0 :(得分:3)
按照以下步骤为项目升级laravel框架的最佳方法
为您的项目更新laravel。
答案 1 :(得分:1)
您必须先安装这些软件包,然后才能运行composer更新,还必须在composer.json
文件中将laravel的版本更改为5.7。
Ubundu终端命令
sudo apt install php7.2 libapache2-mod-php7.2 php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-zip
删除供应商文件夹,然后尝试
composer update
答案 2 :(得分:0)
php -v
如果低于7,也许您的别名是
php7 -v
或
php72 -v
许多服务器使用php别名
答案 3 :(得分:0)
只需在composer.json文件中将laravel更改为5.7。*并运行composer install命令
答案 4 :(得分:0)
是因为这一行
cartalyst / stripe-laravel v7.0.0需要照明/支持5.5
谢谢大家的帮助...
我只是更新了Cartalyst软件包,而作曲家也更新了它的工作
结论:要更新您的laravel项目,请记住要升级您的第三方软件包..