Skip to content

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

Merged

Conversation

james-johnston-thumbtack
Copy link
Contributor

Documentation for new setMinDepth function in the VarDumper component's cloner. (This function is pending code review / merge.)

fabpot added a commit to symfony/symfony that referenced this pull request Jul 17, 2017
…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
@james-johnston-thumbtack james-johnston-thumbtack changed the title [WCM] Document new VarCloner::setMinDepth function Document new VarCloner::setMinDepth function Jul 17, 2017
@james-johnston-thumbtack
Copy link
Contributor Author

The actual code has been merged, so this PR is also ready for review and subsequent merging now.

@xabbuh xabbuh added this to the 3.4 milestone Jul 18, 2017
algorithm so that lower level items have higher priority than deeply nested
items;
items. Specifying ``-1`` removes the limit.
Copy link
Contributor

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?

Copy link
Contributor Author

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

@javiereguiluz
Copy link
Member

James, thanks for your contribution! I'm sorry it took us so long to merge it ... but it's finally merged!

@javiereguiluz javiereguiluz merged commit 32ca116 into symfony:3.4 Feb 1, 2018
javiereguiluz added a commit that referenced this pull request Feb 1, 2018
…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
@james-johnston-thumbtack
Copy link
Contributor Author

Well, better late than never. :)

@james-johnston-thumbtack james-johnston-thumbtack deleted the VarCloner-setMinDepth branch February 1, 2018 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants