ray icon indicating copy to clipboard operation
ray copied to clipboard

Expanding arrays in bit larger datasets doesn't work properly

Open SamuelNitsche opened this issue 2 years ago • 2 comments

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:

  • spatie/ray package version: 1.34.5
  • spatie/laravel-ray package version (if applicable): 1.29.7

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):

  • OS: macOS
  • Version: 12.4

Additional context

SamuelNitsche avatar Jun 11 '22 20:06 SamuelNitsche

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 avatar Jul 09 '22 06:07 techno-trace

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

techno-trace avatar Jul 15 '22 04:07 techno-trace

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.

spatie-bot avatar Nov 16 '22 11:11 spatie-bot