将Laravel项目从5.5升级到最新版本8

时间:2020-09-26 07:20:20

标签: laravel

我想将我的Laravel项目从(5.5升级到8),我将为此做些什么。 我没有找到任何要从5.5升级到8的文档,只是从5.5升级到5.6或从7升级到8,也许必须逐步将项目从5.5升级到5.6,然后从5.6升级到5.7,然后.... nutil 8 谢谢

composer.json(Laravel 5.5):

{
"name": "HomFolio",
"description": "Smart Property Investing",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=7.0.0",
    "ext-json": "*",
    "barryvdh/laravel-dompdf": "^0.8.1",
    "barryvdh/laravel-translation-manager": "dev-master",
    "fideloper/proxy": "~3.3",
    "intervention/image": "^2.4",
    "joedixon/laravel-translation": "^1.1",
    "laravel/framework": "5.5.*",
    "laravel/tinker": "~1.0",
    "stripe/stripe-php": "^4.7",
    "zizaco/entrust": "dev-master"
},
"require-dev": {
    "filp/whoops": "~2.0",
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "~1.0",
    "phpunit/phpunit": "~6.0",
    "xethron/migrations-generator": "^2.0"
},
"autoload": {
    "classmap": [
        "database/seeds",
        "database/factories"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "psr-4": {
        "Tests\\": "tests/"
    }
},
"extra": {
    "laravel": {
        "dont-discover": [
        ]
    }
},
"scripts": {
    "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "@php artisan key:generate"
    ],
    "post-autoload-dump": [
        "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
        "@php artisan package:discover"
    ]
},
"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "optimize-autoloader": true
}
}

composer.json(Laravel 8):

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
    "framework",
    "laravel"
],
"license": "MIT",
"require": {
    "php": "^7.2.5",
    "fideloper/proxy": "^4.2",
    "fruitcake/laravel-cors": "^1.0",
    "guzzlehttp/guzzle": "^6.3",
    "laravel/framework": "^7.0",
    "laravel/tinker": "^2.0"
},
"require-dev": {
    "facade/ignition": "^2.0",
    "fzaninotto/faker": "^1.9.1",
    "mockery/mockery": "^1.3.1",
    "nunomaduro/collision": "^4.1",
    "phpunit/phpunit": "^8.5"
},
"config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
},
"extra": {
    "laravel": {
        "dont-discover": []
    }
},
"autoload": {
    "psr-4": {
        "App\\": "app/"
    },
    "classmap": [
        "database/seeds",
        "database/factories"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Tests\\": "tests/"
    }
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
    "post-autoload-dump": [
        "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
        "@php artisan package:discover --ansi"
    ],
    "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "@php artisan key:generate --ansi"
    ]
}
}

2 个答案:

答案 0 :(得分:1)

看起来升级是连续的。截至今天,我有一个 Laravel 5.7 项目,我必须升级到 Laravel 8,这看起来像我需要采取的序列。 Upgrade sequence

即使您选择了强烈推荐的 Laravel Shift,您也必须为每次升级付费,如下图所示。

Upgrade pricing

如果您有预算,laravel shift 看起来是一种快速简便的升级方式

答案 1 :(得分:0)

恐怕您将不得不迭代升级。

如果您有预算,可以使用Laravel Shift之类的服务 自动进行升级。