カテゴリー
Linux

Laravel 5.7 を 5.8 へアップグレードした手順メモ

依存パッケージのアップデート

$ git diff composer.json
diff --git a/composer.json b/composer.json
index 5547847..de4ac8e 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,7 @@
     "require": {
         "php": ">=7.1.3",
         "fideloper/proxy": "^4.0",
-        "laravel/framework": "5.7.*",
+        "laravel/framework": "5.8.*",
         "laravel/tinker": "~1.0"
     },
     "require-dev": {
$
composer update

実際

$ docker-compose run --rm composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 3 updates, 15 removals
  - Removing zendframework/zend-diactoros (2.1.3)
  - Removing ralouphie/getallheaders (3.0.3)
  - Removing psr/http-message (1.0.1)
  - Removing psr/http-factory (1.0.1)
  - Removing php-http/promise (v1.0.0)
  - Removing php-http/httplug (v1.1.0)
  - Removing php-http/guzzle6-adapter (v1.1.1)
  - Removing nexmo/client (1.8.1)
  - Removing lcobucci/jwt (3.3.1)
  - Removing laravel/slack-notification-channel (v1.0.3)
  - Removing laravel/nexmo-notification-channel (v1.0.1)
  - Removing kylekatarnls/update-helper (1.1.1)
  - Removing guzzlehttp/psr7 (1.6.1)
  - Removing guzzlehttp/promises (v1.3.1)
  - Removing guzzlehttp/guzzle (6.3.3)
  - Installing phpoption/phpoption (1.5.0): Downloading (100%)
  - Updating vlucas/phpdotenv (v2.6.1 => v3.4.0): Downloading (100%)
  - Updating nesbot/carbon (1.39.0 => 2.21.3): Downloading (100%)
  - Updating laravel/framework (v5.7.28 => v5.8.29): Downloading (100%)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: fideloper/proxy
Discovered Package: krlove/eloquent-model-generator
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: orangehill/iseed
Discovered Package: xethron/migrations-generator
Package manifest generated successfully.
... 略 ...
$

おわりに

アップグレードガイド 5.8 Laravel は長いページでしたけれども、今回の場合は開発の初期段階であることが大きく、アップグレード作業は多くありませんでした。

ラッキーでした。

以上です。

コメントを残す