Skip to content

1.2.0

Compare
Choose a tag to compare
@roxblnfk roxblnfk released this 27 Nov 18:29
· 321 commits to master since this release
1.2.0
0eb5d12

What's Changed

  • Add trap() options: if(), once(), times(), depth() by @roxblnfk in #29

Trap options

We've updated the trap() function. Now, you can:

  • Limit the depth of the dumped structure:
    trap($veryDeepArray)->depth(3);
  • Limit the number of dumps for similar data:
    foreach ($veryLargeArray as $item) {
        // We don't need to dump more than 3 items
        trap($item)->times(3);
    }
  • Dump only if a condition is true:
    trap($animal)->once()->if($var instanceof Animal\Cat);

These changes provide more control over the debugging process.

Full Changelog: 1.1.0...1.2.0