【Composer,Laravel】barryvdh/laravel-ide-helperパッケージを追加時にエラー。（＝Laravel6系のideヘルパーをインストール）


自分用のメモとして残します。


arryvdh/laravel-ide-helperというLaravel用のideヘルパーをインストールしようとしたらエラーになった。
<details>
<summary>（クリックでエラー内容表示）</summary><div>

```shell
$ COMPOSER_MEMORY_LIMIT=-1 composer require --dev barryvdh/laravel-ide-helper
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Using version ^2.10 for barryvdh/laravel-ide-helper
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for barryvdh/laravel-ide-helper ^2.10 -> satisfiable by barryvdh/laravel-ide-helper[v2.10.0].
    - Conclusion: remove laravel/framework v6.18.41
    - Conclusion: don't install laravel/framework v6.18.41
    - barryvdh/laravel-ide-helper v2.10.0 requires illuminate/filesystem ^8 -> satisfiable by illuminate/filesystem[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.10.0, 
v8.11.0, v8.11.1, v8.11.2, v8.12.0, v8.12.1, v8.12.2, v8.12.3, v8.13.0, v8.14.0, v8.15.0, v8.16.0, v8.16.1, v8.17.0, v8.17.2, v8.18.0, v8.18.1, v8.19.0, v8.2.0, v8.20.0, v8.20.1, v8.21.0, v8.22.0, v8.22.1, v8.23.1, v8.24.0, v8.25.0, v8.26.0, v8.26.1, v8.27.0, v8.28.0, v8.28.1, v8.29.0, v8.3.0, v8.30.0, v8.30.1, v8.31.0, v8.32.0, v8.32.1, v8.33.0, v8.33.1, v8.34.0, v8.35.0, v8.35.1, v8.36.0, v8.36.1, v8.36.2, v8.37.0, v8.38.0, v8.39.0, v8.4.0, v8.40.0, v8.41.0, v8.42.0, v8.42.1, v8.43.0, v8.44.0, v8.45.0, v8.45.1, v8.46.0, v8.47.0, v8.48.0, 
v8.48.1, v8.48.2, v8.49.0, v8.49.1, v8.49.2, v8.5.0, v8.50.0, v8.51.0, v8.52.0, v8.53.0, v8.53.1, v8.54.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0, v8.9.0].
    - don't install illuminate/filesystem 8.x-dev|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.0.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.0.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.0.2|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.0.3|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.0.4|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.1.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.10.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.11.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.11.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.11.2|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.12.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.12.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.12.2|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.12.3|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.13.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.14.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.15.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.16.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.16.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.17.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.17.2|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.18.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.18.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.19.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.2.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.20.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.20.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.21.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.22.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.22.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.23.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.24.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.25.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.26.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.26.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.27.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.28.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.28.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.29.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.3.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.30.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.30.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.31.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.32.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.32.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.33.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.33.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.34.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.35.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.35.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.36.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.36.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.36.2|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.37.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.38.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.39.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.4.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.40.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.41.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.42.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.42.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.43.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.44.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.45.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.45.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.46.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.47.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.48.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.48.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.48.2|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.49.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.49.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.49.2|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.5.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.50.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.51.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.52.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.53.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.53.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.54.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.6.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.7.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.7.1|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.8.0|don't install laravel/framework v6.18.41
    - don't install illuminate/filesystem v8.9.0|don't install laravel/framework v6.18.41
    - Installation request for laravel/framework (locked at v6.18.41, required as ^6.2) -> satisfiable by laravel/framework[v6.18.41].


Installation failed, reverting ./composer.json to its original content.
```
</div></details>
調べてみると、Laravelのバージョンが古いから最新のideヘルパーはインストールできないようだ。
今回はLTSであるLaravel6系をインストールしており、最新ideヘルパーはLaravel8系しか対応していないためエラーになったようだ。


#やり方
ということでヘルパー側であるbarryvdh/laravel-ide-helperをバージョン指定してインストール

```shell
$ composer require --dev barryvdh/laravel-ide-helper:2.8.*
```
※上記は6系に対応している2.8をインストールするためのコマンドです。



以上。