beyondcode/laravel-dump-server

dump-server ignores first dump in MacOS

imami opened this issue ยท 6 comments

imami commented
  • Dump-Server Version: 1.3.0
  • Laravel Version: v6.7.0
  • PHP Version: 7.3.0 , 7.4.0
  • OS: MacOS Catalina 10.15.1

Description:

dump('this text is displayed in web output');
dump('this text is displayed in dump-server output');

While php artisan dump-server is runnig,
first dump(...) result is sent to the output of my application, and the next dumps appears in the dump-server output!

The issue exists in MacOS, but same code is ok on other linux-based os.

anything to be considered?

I'm also having this issue on MacOS.

imami commented

I mean if run php artisan dump-server, and then run following code somewhere in the project, or in Tinker:

echo 'Hello';
for($i = 0 ; $i < 5 ; $i++) {
    dump('test ' . $i);
}
echo 'World';

the output of this code will be :

Hello
"test 0"
World

and the dump-server would display the rest:

"test 1"
"test 2"
"test 3"
"test 4"

That happens while the expected behaviour is not to display anything in main output, but send all dumps to the running dump-server!

For me, This happen regardless of Laravel or dump server version.

  • OS: MacOS 10.15.4
  • nginx: 1.17.10
  • php: 7.3.17
  • Laravel: ^6.0 , ^7.0
  • beyondcode/laravel-dump-server: ^1.0 , ^1.4

@mpociot Any Idea?

I'm getting a total ignore of dump when in an HTTP context. I put @imami 's for loop at the top of one of my controller methods, started dump-server, and hit reload in the browser. All of the dump's went to the browser, none to the dump-server.

  • Windows 10
  • PHP: 7.2
  • Laravel: ^6.0
  • dump-server: ^1.3

I am running PHP/Laravel inside a Vagrant box.

foof commented

I have this exact issue on my freshly installed M1 Max. PHP was installed with homebrew and valet.

The code example from @imami 100% of the time dumps "test 0" to the browser, and all the other dumps goes into the running dump-server process

I can confirm this issue too. First dump goes to a web page, rest goes to the console.

PHP 8.1 / MAMP Pro
MBP 14 / MacOS Monterey

A colleague of mine managed to fixed this issue on his M1 machine by installing brew & php in the Intel variant and have them run via Rosetta.