将 Laravel 版本从 7.x 更新到 8.0

问题描述 投票:0回答:4

我正在使用 Composer 命令通过 CMD 将我的 laravel 版本从 7.x 更新到 8.0

composer update
,但我收到错误

 D:\xampp\htdocs\salebaba>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
        - Conclusion: don't install laravel/framework v8.5.0
        - Conclusion: don't install laravel/framework v8.4.0
        - Conclusion: don't install laravel/framework v8.3.0
        - Conclusion: don't install laravel/framework v8.2.0
        - Conclusion: don't install laravel/framework v8.1.0
        - Conclusion: don't install laravel/framework v8.0.4
        - Conclusion: don't install laravel/framework v8.0.3
        - Conclusion: don't install laravel/framework v8.0.2
        - Conclusion: don't install laravel/framework v8.0.1
        - Conclusion: don't install laravel/framework v8.0.0
        - laravel/socialite v4.1.4 requires illuminate/support ~5.7.0|~5.8.0|^6.0 -> satisfiable by laravel/framework[6.x-dev], illuminate/support[5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, 6.x-dev, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.10, v6.18.11, v6.18.12, v6.18.13, v6.18.14, v6.18.15, v6.18.16, v6.18.17, v6.18.18, v6.18.19, v6.18.2, v6.18.20, v6.18.21, v6.18.22, v6.18.23, v6.18.24, v6.18.25, v6.18.26, v6.18.27, v6.18.28, v6.18.29, v6.18.3, v6.18.30, v6.18.31, v6.18.32, v6.18.33, v6.18.34, v6.18.35, v6.18.36, v6.18.37, v6.18.38, v6.18.39, v6.18.4, v6.18.40, v6.18.5, v6.18.6, v6.18.7, v6.18.8, v6.18.9, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0].
        - laravel/socialite v4.4.1 requires illuminate/support ~5.7.0|~5.8.0|^6.0|^7.0 -> satisfiable by laravel/framework[v7.28.3, 6.x-dev], illuminate/support[5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, 6.x-dev, 7.x-dev, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.10, v6.18.11, v6.18.12, v6.18.13, v6.18.14, v6.18.15, v6.18.16, v6.18.17, v6.18.18, v6.18.19, v6.18.2, v6.18.20, v6.18.21, v6.18.22, v6.18.23, v6.18.24, v6.18.25, v6.18.26, v6.18.27, v6.18.28, v6.18.29, v6.18.3, v6.18.30, v6.18.31, v6.18.32, v6.18.33, v6.18.34, v6.18.35, v6.18.36, v6.18.37, v6.18.38, v6.18.39, v6.18.4, v6.18.40, v6.18.5, v6.18.6, v6.18.7, v6.18.8, v6.18.9, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0, v7.0.0, v7.0.1, v7.0.2, v7.0.3, v7.0.4, v7.0.5, v7.0.6, v7.0.7, v7.0.8, v7.1.0, v7.1.1, v7.1.2, v7.1.3, v7.10.0, v7.10.1, v7.10.2, v7.10.3, v7.11.0, v7.12.0, v7.13.0, v7.14.0, v7.14.1, v7.15.0, v7.16.0, v7.16.1, v7.17.0, v7.17.1, v7.17.2, v7.18.0, v7.19.0, v7.19.1, v7.2.0, v7.2.1, v7.2.2, v7.20.0, v7.21.0, v7.22.0, v7.22.1, v7.22.2, v7.22.3, v7.22.4, v7.23.0, v7.23.1, v7.23.2, v7.24.0, v7.25.0, v7.26.0, v7.26.1, v7.27.0, v7.28.0, v7.28.1, v7.28.2, v7.28.3, v7.3.0, v7.4.0, v7.5.0, v7.5.1, v7.5.2, v7.6.0, v7.6.1, v7.6.2, v7.7.0, v7.7.1, v7.8.0, v7.8.1, v7.9.0, v7.9.1, v7.9.2].
        
        - laravel/socialite v4.1.3 requires illuminate/support ~5.7.0|~5.8.0|~5.9.0 -> satisfiable by illuminate/support[5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9].
        - laravel/socialite 4.1.1 requires illuminate/contracts ~5.7.0|~5.8.0 -> satisfiable by illuminate/contracts[5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9].
   .

这里是

Composer.json

"require": {
    "php": "^7.3",
    "fideloper/proxy": "^4.0",
    "intervention/image": "^2.4",
    "laravel/framework": "^8.0",
    "laravel/socialite": "^4.1",
    "laravel/tinker": "^2.0",
    "laravel/ui": "^3.0",
    "maatwebsite/excel": "^3.1",
    "paypal/rest-api-sdk-php": "^1.14",
    "rosell-dk/webp-convert": "^2.3",
    "srmklive/paypal": "~1.0"
},
"require-dev": {
    "beyondcode/laravel-dump-server": "^1.0",
    "filp/whoops": "^2.0",
    "fzaninotto/faker": "^1.4",
    "mockery/mockery": "^1.0",
    "nunomaduro/collision": "^5.0",
    "phpunit/phpunit": "^9.0"
},
php laravel composer-php
4个回答
7
投票
"require": {
"php": "^7.3",
"fideloper/proxy": "^4.0",
"intervention/image": "^2.4",
"laravel/framework": "^8.0",
"laravel/socialite": "^4.1",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"maatwebsite/excel": "^3.1",
"paypal/rest-api-sdk-php": "^1.14",
"rosell-dk/webp-convert": "^2.3",
"srmklive/paypal": "~1.0"},

用这些更新上面的部分....

"laravel/socialite": "^5.0",

3
投票

更新这个

 "laravel/socialite": "^5.0",

然后运行

composer update

https://github.com/laravel/socialite/releases/tag/v5.0.1它支持的最新版本

laravel 8


1
投票

该错误表明您的软件包安装列表存在冲突,您正在尝试安装socialite v4,但这需要laravel v6。如果你更新到 Socialite v5 应该可以工作

    "require": {
"php": "^7.3",
"fideloper/proxy": "^4.0",
"intervention/image": "^2.4",
"laravel/framework": "^8.0",
"laravel/socialite": "^5.1",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"maatwebsite/excel": "^3.1",
"paypal/rest-api-sdk-php": "^1.14",
"rosell-dk/webp-convert": "^2.3",
"srmklive/paypal": "~1.0"},

0
投票

您必须从头开始执行以下步骤:

  1. 备份您的composer.json:

    • 为了安全起见,请备份当前的
      composer.json
      文件。
  2. 更新composer.json:

  3. 更新异常处理程序:

  4. 运行作曲家更新:

    • 在项目的根目录中运行命令
      composer update
  5. 检查新包裹:

    • 查看您的旧
      composer.json
      文件。如果已添加软件包,您可以使用命令
      composer require <package name>
      安装它们。
  6. 再次更新 Composer:

    • 最后,再次运行命令
      composer update
      以确保一切都是最新的。
© www.soinside.com 2019 - 2024. All rights reserved.