composer.jsonを編集

php
>=5.6.4 → >=7.0.0
laravel/framework
5.4.* → 5.5.*
phpunit/phpunit
~5.0 → ~6.0
require-devセクション
filp/whoopsパッケージ(バージョン~2.0)を追加
scriptsセクション
post-autoload-dumpイベントへpackage:discoverコマンドを追加

"require": {
        "php": ">=7.0.0",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0"
    },
"require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "filp/whoops":"~2.0",
        "phpunit/phpunit": "~6.0"
    },


"post-autoload-dump":[
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]

[vagrant@localhost laravel]$ ls
blog composer.phar
[vagrant@localhost laravel]$ cp composer.phar blog/composer.phar
[vagrant@localhost laravel]$ cd blog
[vagrant@localhost blog]$ ls
app composer.lock package.json resources tests
artisan composer.phar phpunit.xml routes vendor
bootstrap config public server.php webpack.mix.js
composer.json database readme.md storage
[vagrant@localhost blog]$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 12 installs, 13 updates, 1 removal
– Removing symfony/yaml (v4.2.5)
– Updating paragonie/random_compat (v2.0.18 => v9.99.99): Loading from cache
– Installing symfony/polyfill-php72 (v1.11.0): Downloading (100%)
– Installing symfony/polyfill-intl-idn (v1.11.0): Downloading (100%)
– Installing symfony/polyfill-iconv (v1.11.0): Downloading (100%)
– Installing doctrine/lexer (v1.0.1): Loading from cache
– Installing egulias/email-validator (2.1.7): Downloading (100%)
– Updating swiftmailer/swiftmailer (v5.4.12 => v6.2.0): Downloading (100%) – Installing psr/simple-cache (1.0.1): Loading from cache
– Installing psr/container (1.0.0): Loading from cache
– Updating laravel/framework (v5.4.36 => v5.5.45): Downloading (100%)
– Updating sebastian/recursion-context (2.0.0 => 3.0.0): Loading from cache
– Installing sebastian/object-reflector (1.1.1): Loading from cache
– Updating sebastian/object-enumerator (2.0.1 => 3.0.3): Loading from cache
– Updating sebastian/global-state (1.1.1 => 2.0.0): Loading from cache
– Updating sebastian/exporter (2.0.0 => 3.1.0): Loading from cache
– Updating sebastian/environment (2.0.0 => 3.1.0): Loading from cache
– Updating sebastian/diff (1.4.3 => 2.0.1): Downloading (100%)
– Updating sebastian/comparator (1.2.4 => 2.1.3): Downloading (100%)
– Updating phpunit/phpunit-mock-objects (3.4.4 => 5.0.10): Downloading (100%) – Installing theseer/tokenizer (1.1.2): Loading from cache
– Updating phpunit/php-code-coverage (4.0.8 => 5.3.2): Downloading (100%) – Installing phar-io/version (1.0.1): Loading from cache
– Installing phar-io/manifest (1.0.1): Loading from cache
– Updating phpunit/phpunit (5.7.27 => 6.5.14): Downloading (100%)
– Installing filp/whoops (2.3.1): Loading from cache
filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
[vagrant@localhost blog]$ php artisan –version
Laravel Framework 5.5.45

うおおおおおおおおおおおおおおおおおおお
アップデートできたーーーーーーーーーーーーーーーーー
すげーーーーーーーーーーーーーー

続いて、5.5→5.6をやりましょう。