laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.73k stars 289 forks source link

Loses communication with worker when using `dump()` #868

Closed carestad closed 3 months ago

carestad commented 3 months ago

Octane Version

2.3.7

Laravel Version

11.3.1

PHP Version

8.3.6

What server type are you using?

Roadrunner

Server Version

2024.1.0

Database Driver & Version

sqlite

Description

I noticed when trying to debug a URL issue, that if you add a dump() (dd() works though) statement inside a closure based route definition (see here), the Roadrunner server will print an error (RoadRunner can't communicate with the worker) and the request gets a 500 response instead. No more info to trace anywhere as far as I can tell.

This might be intentional or by design, but would be nice to have documented if it is.

Steps To Reproduce

Repro repo: https://github.com/carestad/octane-dump-bug

Steps:

  1. git clone https://github.com/carestad/octane-dump-bug
  2. composer install
  3. php artisan octane:start --server roadrunner
  4. open http://localhost:8000/foo
github-actions[bot] commented 3 months ago

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

AlliBalliBaba commented 3 months ago

This might be related to 838. dump() just doesn't output anything in Octane. You can try setting $_SERVER['VAR_DUMPER_FORMAT'] = 'html'; before dump() and see if it helps.

sy-records commented 3 months ago

Duplicate of #856

driesvints commented 3 months ago

thanks all. Looks like we're not taking any action here, sorry.