2

I'm developing a new project in the last version of Laravel (8.12) and I've figured out that the function helper dd() don't work properly. Supposedly this function halts the execution of the script as is mentioned in the official doc, but in my case, the scripts continues until the end of it.

Example:

public function store(AnimalNewRequest $request)
{
    dd('Test 1');
    dd('Test 2');
}

Output:

"Test 1"
"Test 2"

Expected Output:

"Test 1"
Alvaro_SE
  • 125
  • 2
  • 13
  • I think the first thing I’d try is to see if you are getting Symfony’s dd function (which is what Laravel uses) or someone else’s: https://stackoverflow.com/a/2222404/231316 – Chris Haas May 18 '21 at 12:31
  • Yep, is using the symfony's dd function: `vendor/symfony/var-dumper/Resources/functions/dump.php:35` – Alvaro_SE May 18 '21 at 12:46
  • 1
    I read that FastCGI doesn't respect `exit;` immediately, tho I have not verified, could this be the case? – Daniel W. May 18 '21 at 13:20
  • 1
    Can you temporarily hack your vendor folder's `dump.php` file to put an `echo` before and after the `exit`, just to see it right at that moment? – Chris Haas May 18 '21 at 15:12
  • @DanielW. Things can go around here, I'm going to investigate. – Alvaro_SE May 19 '21 at 10:22

1 Answers1

0

Finally, it should be an error of vagrant and laravel homestead. Last update fixed the problem.

Alvaro_SE
  • 125
  • 2
  • 13