spatie / ray

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

Expanding arrays in bit larger datasets doesn't work properly #709

Closed SamuelNitsche closed 1 year ago

SamuelNitsche commented 2 years ago

Describe the bug When dumping an array with ~60 entries the arrow to expand entries is broken (as visible in the screenshot)

Versions Latest (2.0.1)

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

PHP version: Laravel version (if applicable): 8.1

To Reproduce Steps to reproduce the behavior:

  1. Create an array with ~60 or more entries
  2. Call ray($items)
  3. View the output and try to expand different entries

Expected behavior All entries should be properly expandable.

Screenshots

Bildschirmfoto 2022-06-11 um 22 13 22

Desktop (please complete the following information):

techno-trace commented 2 years ago

It's same with me as well, also I thought using these on AppServiceProvider would work as it works on dd() for larger datasets. @freekmurze please help on this as it becomes harder debugging large datasets without pin pointing the actual data to be dumped.


use Symfony\Component\VarDumper\VarDumper;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\CliDumper;
use Symfony\Component\VarDumper\Dumper\HtmlDumper;

VarDumper::setHandler(function ($var) {
    $cloner = new VarCloner();
    $cloner->setMaxItems(-1); // Specifying -1 removes the limit
    $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper();

    $dumper->dump($cloner->cloneVar($var));
});
techno-trace commented 2 years ago

Hey @freekmurze, can you please help us resolve this or suggest a workaround for this issue, as this becomes harder to look in nested objects properly. This is SUPER IMPORTANT! 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 cc: @SamuelNitsche

spatie-bot commented 1 year 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.