herd-community icon indicating copy to clipboard operation
herd-community copied to clipboard

[Bug]: Dump going to response body

Open swarley opened this issue 1 year ago • 5 comments

Platform

macOS

Operating system version

macOS Sonoma 14.5

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.9.1

PHP Version

No response

Bug description

When using dump (not dd) the dump is being prepended to the response body and not going to the dump window. This was working fine prior to updating (I assume version 1.6). Confirmed with other members of my team with the same operating system and herd versions

Steps to reproduce

image

$routes->get('dump-check', static function () {
    dump('foo');

    return response('hello world', 200);
});

Relevant log output

No response

swarley avatar Jul 11 '24 14:07 swarley

@swarley What happens if you toggle dump interception in the dump window? Are the dumps still not picked up but be visible in the browser?

sschlein avatar Jul 15 '24 09:07 sschlein

I have the same issue (same OS and Herd version).

Nothing happens after toggling the interception. Dumps are going to the response body still.

I've also tried restarting Herd.

mirceasoaica avatar Jul 15 '24 09:07 mirceasoaica

Could you post your related php.ini here? Does changing from PHP 8.3 to 8.2 and back to 8.3 again (or different versions)

There seems to be a problem with the dump loader.

sschlein avatar Jul 15 '24 09:07 sschlein

Changing the PHP versions doesn't do anything.

Here's my php.ini config for PHP 8.3

curl.cainfo=/Users/mircea/Library/Application Support/Herd/config/php/cacert.pem
openssl.cafile=/Users/mircea/Library/Application Support/Herd/config/php/cacert.pem
pcre.jit=0
max_input_vars=9999999
memory_limit=256M
upload_max_filesize=10M
auto_prepend_file=/Applications/Herd.app/Contents/Resources/valet/dump-loader.php

mirceasoaica avatar Jul 15 '24 10:07 mirceasoaica

@mirceasoaica I know this issue has been open for a while but have you tried to force-stop the existing services? When Herd adds the auto_prepend_file to your php.ini, FPM needs to be restarted in order for these changes to take effect. Maybe the service was somehow "stuck".

mpociot avatar Aug 12 '24 13:08 mpociot