LoginSignup
0
1

More than 3 years have passed since last update.

laravel 6.x to 7.x upgrade

Posted at

移行手順は以下のサイトを参考にする。
Laravel 7.x アップグレードガイド

composer.jsonを修正する。

laravel/uiも利用している場合はlaravel/uiも修正する。

composer.json
{
  "require" : {
    "laravel/framework": "^7.0",
    "laravel/tinker": "^2.0",
    "laravel/ui": "^2.0",
    "facade/ignition": "^2.0",
    "nunomaduro/collision": "^4.1",
  },
]

Exceptionクラスの修正

Symfony 5.xになりExceptionクラスからThrowableクラスに変わったので
Exceptionクラスで引数を渡している個所の修正が必要

新規なら問題ないが既存アプリだとapp/Exception/Handler.phprenderreportの引数
ExceptionをThrowableに変更。

app/Exception/Handler.php
/* use Exception; */
use Throwable;

/* public function report(Exception $exception) */
public function report(Throwable $exception)

config/session.phpの修正

config/session.php
/* 'secure' => env('SESSION_SECURE_COOKIE', false), */
'secure' => env('SESSION_SECURE_COOKIE', null),

composer update実行でアップグレード完了。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1