7
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravel Dump Server インストールエラー Argument 1 passed to Symfony\Component\VarDumper\Server\Connection::__construct() must be of the type string

Last updated at Posted at 2020-04-30

https://github.com/beyondcode/laravel-dump-server Laravel Dump Serverのライブラリをインストールしようとしたところ謎のエラーが発生してしまいました。

環境

  • PHP 7.4.5
  • Laravel 7.5.1
  • Laravel Dump Server 2.7.0

問題

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

Using version ^1.4 for beyondcode/laravel-dump-server
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In Connection.php line 32:
                                                                               
  Argument 1 passed to Symfony\Component\VarDumper\Server\Connection::__const  
  ruct() must be of the type string, null given, called in /work/backend/vend  
  or/beyondcode/laravel-dump-server/src/DumpServerServiceProvider.php on line  
   49                                                                          
                                                                               

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json to its original content.

インストールに失敗してちょっとビビリました。

対策

こちらのイシューを見たところ、キャッシュが悪さしてるようです。

$ rm bootstrap/cache/config.php

キャッシュファイルを削除して、再度インストールしなおせばokです。

$ composer require --dev beyondcode/laravel-dump-server
7
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?