You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the 2.6-dev branch.
Discussion
----------
[VarDumper] enhance dumping refs
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | nicolas-grekas/Patchwork-Dumper#39
| License | MIT
| Doc PR | -
This makes dumps prettier:
- VarCloner now exposes the "isref" state of a PHP variable
- on hard refs, `#n` suffix is replaced by `&n` prefix
- `#n`/`@n` (object/resource refs) are moved inside the `{ }`
- all repetitive dumps of the same object are toggle-able
- all repetitive dumps of the same object / hard ref are *visually* identical
- dumps expose local ref counts and object's handle
I also simplified the `Cloner\DumperInterface`.
For the same (circumvoluted) variable:
Before:

After:

Commits
-------
3c401af [VarDumper] enhance dumping refs
0 commit comments