Laravel5.6.39升级为Laravel5.7.26教程

Laravel5.6.39升级为Laravel5.7.26教程,因为不同的生产环境,与配置有可能出现不同的错误信息提示,因为laravel5.5以后出现的相应5.6/5.7版本都需要PHP7.0以上才可以正常运行。下面为laravel升级流程:

一、修改composer.json文件

修改php版本为7.13
修改laravel/framework版本为5.7.

    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.1.3",
        "encore/laravel-admin": "1.5.*",
        "estgroupe/laravel-taggable": "5.1.*",
        "fideloper/proxy": "~3.3",
        "laravel/framework": "5.7.*",
        "laravel/tinker": "~1.0",
        "spatie/laravel-feed": "^2.1",
        "stevenyangecho/laravel-u-editor": "~1.4",
        "yuanchao/laravel-5-markdown-editor": "dev-master"
    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "~1.0",
        "phpunit/phpunit": "~7.0",
        "symfony/thanks": "^1.0"
    },

二、清空缓存

php artisan view:clear
php artisan route:clear

三、composer 更新

composer update

如果无报错说明升级成功
如果是Laravel5.5升级为Laravel5.6的过程与问题
如果报如下错误信息请点击点击下面相应链接将看到解决方法:
1.升级过程中出现报错提示Undefined class constant 'HEADER_CLIENT_IP'
2.升级过程中出现报错提示array_keys() expects parameter 1 to be array, integer given
3.如果 Composer更新过程中 提示需要输入 Token信息
这样更改之后刷新页面后框架就正常显示了,OK (T | T) !!!

阅读 169

Comments