4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Laravel5.6へのアップグレード

Posted at

要約

Laravel5.5.32から5.6.3へのアップグレード時に、composer.jsonを簡単に書き換えて
composer updateしたら失敗。
公式ちゃんと見ようね。

失敗

    "require": {
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
-        "laravel/framework": "5.5.*",
+        "laravel/framework": "5.6.*",
        "laravel/tinker": "~1.0"
    },

composer updateを実行

In trustedproxy.php line 66:
                                               
  Undefined class constant 'HEADER_CLIENT_IP' 

エラーとなる

成功

    "require": {
-        "php": ">=7.0.0",
-        "fideloper/proxy": "~3.3",
-        "laravel/framework": "5.5.*",
+        "php": ">=7.1.3",
+        "fideloper/proxy": "~4.0",
+        "laravel/framework": "5.6.*",
         "laravel/tinker": "~1.0"
    },

composer updateで無事終了。

あとはcomposer testして動けばok

参考

4
2
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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?