-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Document new VarCloner::setMinDepth function #8155
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document new VarCloner::setMinDepth function #8155
Conversation
89dd756
to
32ca116
Compare
…ston-thumbtack) This PR was merged into the 3.4 branch. Discussion ---------- [VarDumper] Added setMinDepth to VarCloner 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. | 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
The actual code has been merged, so this PR is also ready for review and subsequent merging now. |
algorithm so that lower level items have higher priority than deeply nested | ||
items; | ||
items. Specifying ``-1`` removes the limit. |
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.
This paragraph changes should target 3.2 right?
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.
This paragraph still accurately describes behavior of older versions. For versions < 3.4 we can assume the minimum nesting depth is hard-coded to 1; this is indicated by the next paragraph that says "The default value is 1, which is consistent with older Symfony versions." The presence of setMaxItems
is much older than v3.2 - it goes back to Symfony 2 (maybe back to the original introduction of VarCloner).
James, thanks for your contribution! I'm sorry it took us so long to merge it ... but it's finally merged! |
…ton-thumbtack) This PR was merged into the 3.4 branch. Discussion ---------- Document new VarCloner::setMinDepth function Documentation for new ``setMinDepth`` function in the VarDumper component's cloner. (This function is pending code review / merge.) Commits ------- 32ca116 Document new VarCloner::setMinDepth function
Well, better late than never. :) |
Documentation for new
setMinDepth
function in the VarDumper component's cloner. (This function is pending code review / merge.)