spatie / ray

Debug with Ray to fix problems faster
https://myray.app
MIT License
579 stars 104 forks source link

Ray doesnt showcase Request Class in Laravel Nova Resources #847

Closed Montrii closed 8 months ago

Montrii commented 1 year ago

Describe the bug When i try to "print" a Request (That can be any Request inherited class meaning: NovaRequest, Request, ResourceCreateOrAttachRequest etc.) object within Laravel Ray within Laravel Nova, ray does not showcase anything about that object. It does not print null or undefined, the object is initialised and does work normally. When i parse the object into variables using parse_str, i can then sorta view the object.

Versions 2.7.5

You can use composer show to get the version numbers of:

PHP version: 8.2 (Running Laravel app on Laravel Herd) Laravel version (if applicable): v10.22.0 Laravel Nova version (additional): 4.27.12

To Reproduce Steps to reproduce the behavior:

  1. Create a Eloquent Model, Factory, Seeder and Migration for a table in Laravel.
  2. Create a Laravel Nova Ressource for the created Eloquent Model
  3. Create Fields for the Model.
  4. Try to print the $request variable with Ray in either thefields(NovaRequest $request) methods directly or in any method that gets a Request instance passed (such as ->default(callback(ResourceCreateOrAttachRequest $request))
  5. The error occures

Expected behavior Request object should be printed normally into ray without issues.

Desktop (please complete the following information):

Vestibule commented 1 year ago

Same problem here. No way to dump a Nova request through Ray.

patinthehat commented 1 year ago

@Montrii @Vestibule Does this occur if you only install the ray package (and not laravel-ray)?

spatie-bot commented 8 months ago

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

rderks88 commented 7 months ago

This issue is still open. Until this day Ray refuses to output a NovaRequest object. One way to get around is is call NovaRequest->toArray(), but you obviously do not get the entire object.