Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

laravel-dump-serverインストールでエラー

経緯

新しく用意したLaravel開発用のサーバーにおいて、そろそろdump-serverで色々dumpさせて確認しようかと思い、下記をコマンドを叩いたら

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

こんなエラーが返ってきて何ぞ?ってなった話です。

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for beyondcode/laravel-dump-server ^1.4 -> satisfiable by beyondcode/laravel-dump-server[1.4.0].
    - Conclusion: remove symfony/var-dumper v4.4.10
    - Conclusion: don't install symfony/var-dumper v4.4.10
    - beyondcode/laravel-dump-server 1.4.0 requires symfony/var-dumper ^5.0 -> satisfiable by symfony/var-dumper[5.0.x-dev, 5.1.x-dev, 5.2.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.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].
    - Can only install one of: symfony/var-dumper[5.0.x-dev, v4.4.10].
    - Can only install one of: symfony/var-dumper[5.1.x-dev, v4.4.10].
  〜省略〜
    - Can only install one of: symfony/var-dumper[v5.1.1, v4.4.10].
    - Can only install one of: symfony/var-dumper[v5.1.2, v4.4.10].
    - Installation request for symfony/var-dumper (locked at v4.4.10) -> satisfiable by symfony/var-dumper[v4.4.10].

環境の確認

エラーを見る感じsymfony/var-dumperが要因なのはなんとなく分かるのですが、
何をどうすりゃいいのか?な状態。
改めてphpやLaravelのバージョンを確認すると

php -v
PHP 7.4.5 (cli) (built: Apr 23 2020 00:10:21) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies
php artisan --version
Laravel Framework 6.18.20

割と新しい目な構成。
もっと枯れたバージョンを使うしか無いんかなと諦め気味でググってると下記を実行しろとな。
本家でissueがあったのですが、laravel-dump-serverのバージョンを指定しないとダメやでって事でした。
https://github.com/beyondcode/laravel-dump-server/issues/62

composer require --dev beyondcode/laravel-dump-server:1.3.0

俺にdump-serverが帰ってきた。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away