Laravel dump-server インストール エラー

##経緯
Laravelの勉強で、dump-serverを使いたいと思ってインストールしようとしたら、エラー出てちょっと詰まったよ。

環境
Laravel Framework：6.18.41
OS：mac
##スタート
```
$ php artisan dump-server
                                         
  Command "dump-server" is not defined.  
```
最初にコマンド打ったら、dump-serverなんて無いよと言われました。
ではインストールしましょう。

##インストールコマンド
```
$ composer require --dev beyondcode/laravel-dump-server
```
https://github.com/beyondcode/laravel-dump-server

##エラー①　メモリ不足？

```
$ composer require --dev beyondcode/laravel-dump-server

Using version ^1.6 for beyondcode/laravel-dump-server
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/Cellar/composer/1.10.13/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
```
よく分からないけど、メモリ不足っぽいような感じかなと。

php.iniを編集してメモリのリミット制限変更するやり方もあるらしいけど、面倒なので`COMPOSER_MEMORY_LIMIT=-1`とコマンドに付け足して、一時だけリミットを外すことにした。

##エラー②　ヴァージョンが合ってない？

```
$ COMPOSER_MEMORY_LIMIT=-1 composer require --dev beyondcode/laravel-dump-server
Using version ^1.6 for beyondcode/laravel-dump-server
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for beyondcode/laravel-dump-server ^1.6 -> satisfiable by beyondcode/laravel-dump-server[1.6.0].
    - Conclusion: remove symfony/var-dumper v4.4.14
    - Conclusion: don't install symfony/var-dumper v4.4.14
    - beyondcode/laravel-dump-server 1.6.0 requires symfony/var-dumper ^5.0 -> satisfiable by symfony/var-dumper[5.0.x-dev, 5.1.x-dev, 5.x-dev, v5.0.0, v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1, v5.0.1, v5.0.10, v5.0.11, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9, v5.1.0, v5.1.0-BETA1, v5.1.0-RC1, v5.1.0-RC2, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.2.0-BETA1, v5.2.0-BETA2, v5.2.0-BETA3].
    - Can only install one of: symfony/var-dumper[5.0.x-dev, v4.4.14].
    - Can only install one of: symfony/var-dumper[5.1.x-dev, v4.4.14].
    - Can only install one of: symfony/var-dumper[5.x-dev, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.0, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.0-BETA1, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.0-BETA2, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.0-RC1, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.1, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.10, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.11, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.2, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.3, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.4, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.5, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.6, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.7, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.8, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.0.9, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.0, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.0-BETA1, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.0-RC1, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.0-RC2, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.1, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.2, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.3, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.4, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.5, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.6, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.7, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.1.8, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.2.0-BETA1, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.2.0-BETA2, v4.4.14].
    - Can only install one of: symfony/var-dumper[v5.2.0-BETA3, v4.4.14].
    - Installation request for symfony/var-dumper (locked at v4.4.14) -> satisfiable by symfony/var-dumper[v4.4.14].


Installation failed, reverting ./composer.json to its original content.
```
composer.jsonに書いてある`"beyondcode/laravel-dump-server": "^1.6"`のため、ヴァージョン1.6.0でインストールを実行しているみたいだけど、それがダメらしい。

##解決
```
$ COMPOSER_MEMORY_LIMIT=-1 composer require --dev beyondcode/laravel-dump-server:1.3.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing beyondcode/laravel-dump-server (1.3.0): Downloading (cDownloading (100%)         
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package phpunit/php-token-stream 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 --ansi
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: laravel/scout
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: teamtnt/laravel-scout-tntsearch-driver
Package manifest generated successfully.
42 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
```
GitHubのIssues見たらすぐに解決しました。
ヴァージョンが1.3.0じゃないと上手く行かないらしい。
https://github.com/beyondcode/laravel-dump-server/issues/62

##終わり
```
$ php artisan dump-server
Laravel Var Dump Server
=======================

                                                                     
 [OK] Server listening on tcp://127.0.0.1:9912                       
                                                                     

 // Quit the server with CONTROL-C.
```
dump-server無事起動。

今回の教訓。
エラーの時はGitHubのIssuesは早めに見ようね。。。