Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[VarDumper] Added setMinDepth to VarCloner#23515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
fabpot merged 1 commit intosymfony:3.4fromjames-johnston-thumbtack:VarCloner-setMinDepthJul 17, 2017
Merged
[VarDumper] Added setMinDepth to VarCloner#23515
fabpot merged 1 commit intosymfony:3.4fromjames-johnston-thumbtack:VarCloner-setMinDepthJul 17, 2017
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This new function allows VarCloner users to specify a minimum treedepth that must be fully explored before we start limiting the number ofcloned items via the existing setMaxItems functionality.It’s useful for dumping arguments from a backtrace to ensure someminimum level of detail, while keeping a very low setMaxItems value toensure fast performance.
nicolas-grekas approved these changesJul 15, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Very nice idea, and PR ready the first time!
fabpot approved these changesJul 17, 2017
Thank you@james-johnston-thumbtack. |
fabpot added a commit that referenced this pull requestJul 17, 2017
…ston-thumbtack)This PR was merged into the 3.4 branch.Discussion----------[VarDumper] Added setMinDepth to VarClonerThis new function allows VarCloner users to specify a minimum treedepth that must be fully explored before we start limiting the number ofcloned items via the existing setMaxItems functionality.It’s useful for dumping arguments from a backtrace to ensure someminimum level of detail, while keeping a very low setMaxItems value toensure fast performance at the deeper levels.| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | yes <!-- don't forget updating src/**/CHANGELOG.md files -->| BC breaks? | no| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->| Tests pass? | yes| Fixed tickets | none| License | MIT| Doc PR |symfony/symfony-docs#8155 <!--highly recommended for new features--><!--- Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too).- Features and deprecations must be submitted against the 3.4, legacy code removals go to the master branch.- Please fill in this template according to the PR you're about to submit.- Replace this comment by a description of what your PR is solving.-->Commits-------d6534f5 [VarDumper] Added setMinDepth to VarCloner
james-johnston-thumbtack added a commit to james-johnston-thumbtack/php-debugbar that referenced this pull requestJul 18, 2017
The Symfony VarDumper component includes an HtmlDumper that dumpsvariables in a rich HTML format that allows for expanding and collapsingindividual tree nodes in the dumped variable. This makes it much morepractical to navigate large/deep variables that have been dumped.DebugBarVarDumper provides a Debug Bar-friendly wrapper around theVarDumper component. It’s intended as a better alternative toDataFormatter::formatVar. It provides for:* Debug Bar-friendly styles for the VarDumper HTML.* Implements AssetProvider for returning VarDumper static assets (requires users of JavascriptRenderer to support inline assets).* Simplifies VarCloner and HtmlDumper function calls for cloning and dumping variables in a Debug Bar environment. VarDumper was originally written/targeted to be a replacement for var_dump, so the default behavior of HtmlDumper echoing static assets and variable dumps directly to the page output isn’t really appropriate. Furthermore, we must contend with several different Symfony versions going back to v2.6.0. This class provides a friendly wrapper.I have tested this with these Symfony versions:* v2.6.0* v2.7.0* v2.8.0* v3.0.0* v3.1.0* v3.2.0* v3.3.0All seem to work fine, with graceful degradation as needed.Furthermore, the class is ready to take advantage of new features that Iadded and are upcoming in Symfony v3.4:* setMinDepth:symfony/symfony#23515 This feature will be valuable for the upcoming BacktraceCollector.
james-johnston-thumbtack added a commit to james-johnston-thumbtack/php-debugbar that referenced this pull requestJul 18, 2017
The Symfony VarDumper component includes an HtmlDumper that dumpsvariables in a rich HTML format that allows for expanding and collapsingindividual tree nodes in the dumped variable. This makes it much morepractical to navigate large/deep variables that have been dumped.DebugBarVarDumper provides a Debug Bar-friendly wrapper around theVarDumper component. It’s intended as a better alternative toDataFormatter::formatVar. It provides for:* Debug Bar-friendly styles for the VarDumper HTML.* Implements AssetProvider for returning VarDumper static assets (requires users of JavascriptRenderer to support inline assets).* Simplifies VarCloner and HtmlDumper function calls for cloning and dumping variables in a Debug Bar environment. VarDumper was originally written/targeted to be a replacement for var_dump, so the default behavior of HtmlDumper echoing static assets and variable dumps directly to the page output isn’t really appropriate. Furthermore, we must contend with several different Symfony versions going back to v2.6.0. This class provides a friendly wrapper.I have tested this with these Symfony versions:* v2.6.0* v2.7.0* v2.8.0* v3.0.0* v3.1.0* v3.2.0* v3.3.0All seem to work fine, with graceful degradation as needed.Furthermore, the class is ready to take advantage of new features that Iadded and are upcoming in Symfony v3.4:* setMinDepth:symfony/symfony#23515 This feature will be valuable for the upcoming BacktraceCollector.
james-johnston-thumbtack added a commit to james-johnston-thumbtack/php-debugbar that referenced this pull requestJul 18, 2017
The Symfony VarDumper component includes an HtmlDumper that dumpsvariables in a rich HTML format that allows for expanding and collapsingindividual tree nodes in the dumped variable. This makes it much morepractical to navigate large/deep variables that have been dumped.DebugBarVarDumper provides a Debug Bar-friendly wrapper around theVarDumper component. It’s intended as a better alternative toDataFormatter::formatVar. It provides for:* Debug Bar-friendly styles for the VarDumper HTML.* Implements AssetProvider for returning VarDumper static assets (requires users of JavascriptRenderer to support inline assets).* Simplifies VarCloner and HtmlDumper function calls for cloning and dumping variables in a Debug Bar environment. VarDumper was originally written/targeted to be a replacement for var_dump, so the default behavior of HtmlDumper echoing static assets and variable dumps directly to the page output isn’t really appropriate. Furthermore, we must contend with several different Symfony versions going back to v2.6.0. This class provides a friendly wrapper.I have tested this with these Symfony versions:* v2.6.0* v2.7.0* v2.8.0* v3.0.0* v3.1.0* v3.2.0* v3.3.0All seem to work fine, with graceful degradation as needed.Furthermore, the class is ready to take advantage of new features that Iadded and are upcoming in Symfony v3.4:* setMinDepth:symfony/symfony#23515 This feature will be valuable for the upcoming BacktraceCollector.
barryvdh pushed a commit to php-debugbar/php-debugbar that referenced this pull requestJul 19, 2017
The Symfony VarDumper component includes an HtmlDumper that dumpsvariables in a rich HTML format that allows for expanding and collapsingindividual tree nodes in the dumped variable. This makes it much morepractical to navigate large/deep variables that have been dumped.DebugBarVarDumper provides a Debug Bar-friendly wrapper around theVarDumper component. It’s intended as a better alternative toDataFormatter::formatVar. It provides for:* Debug Bar-friendly styles for the VarDumper HTML.* Implements AssetProvider for returning VarDumper static assets (requires users of JavascriptRenderer to support inline assets).* Simplifies VarCloner and HtmlDumper function calls for cloning and dumping variables in a Debug Bar environment. VarDumper was originally written/targeted to be a replacement for var_dump, so the default behavior of HtmlDumper echoing static assets and variable dumps directly to the page output isn’t really appropriate. Furthermore, we must contend with several different Symfony versions going back to v2.6.0. This class provides a friendly wrapper.I have tested this with these Symfony versions:* v2.6.0* v2.7.0* v2.8.0* v3.0.0* v3.1.0* v3.2.0* v3.3.0All seem to work fine, with graceful degradation as needed.Furthermore, the class is ready to take advantage of new features that Iadded and are upcoming in Symfony v3.4:* setMinDepth:symfony/symfony#23515 This feature will be valuable for the upcoming BacktraceCollector.
springer12 added a commit to springer12/php-debugbar that referenced this pull requestMay 9, 2020
The Symfony VarDumper component includes an HtmlDumper that dumpsvariables in a rich HTML format that allows for expanding and collapsingindividual tree nodes in the dumped variable. This makes it much morepractical to navigate large/deep variables that have been dumped.DebugBarVarDumper provides a Debug Bar-friendly wrapper around theVarDumper component. It’s intended as a better alternative toDataFormatter::formatVar. It provides for:* Debug Bar-friendly styles for the VarDumper HTML.* Implements AssetProvider for returning VarDumper static assets (requires users of JavascriptRenderer to support inline assets).* Simplifies VarCloner and HtmlDumper function calls for cloning and dumping variables in a Debug Bar environment. VarDumper was originally written/targeted to be a replacement for var_dump, so the default behavior of HtmlDumper echoing static assets and variable dumps directly to the page output isn’t really appropriate. Furthermore, we must contend with several different Symfony versions going back to v2.6.0. This class provides a friendly wrapper.I have tested this with these Symfony versions:* v2.6.0* v2.7.0* v2.8.0* v3.0.0* v3.1.0* v3.2.0* v3.3.0All seem to work fine, with graceful degradation as needed.Furthermore, the class is ready to take advantage of new features that Iadded and are upcoming in Symfony v3.4:* setMinDepth:symfony/symfony#23515 This feature will be valuable for the upcoming BacktraceCollector.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This new function allows VarCloner users to specify a minimum tree
depth that must be fully explored before we start limiting the number of
cloned items via the existing setMaxItems functionality.
It’s useful for dumping arguments from a backtrace to ensure some
minimum level of detail, while keeping a very low setMaxItems value to
ensure fast performance at the deeper levels.