Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[VarDumper] Adding semantics with metadata#6946

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
xabbuh merged 1 commit intosymfony:masterfromnicolas-grekas:var-dumper-32
Oct 14, 2016

Conversation

@nicolas-grekas
Copy link
Member

No description provided.

The VarDumper component provides mechanisms forwalking through any
arbitrary PHPvariable. Built on top, it provides a better ``dump()``
functionthat you can use instead of:phpfunction:`var_dump`.
The VarDumper component provides mechanisms forextracting the state out of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

extracting the state ->extracting the contents ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

state = content + context/metadata

javiereguiluz and apfelbox reacted with thumbs up emoji
fabpot added a commit to symfony/symfony that referenced this pull requestSep 2, 2016
…identifiers (nicolas-grekas)This PR was merged into the 3.2-dev branch.Discussion----------[VarDumper] Add ClassStub for clickable & shorter PHP identifiers| Q             | A| ------------- | ---| Branch?       | master| New feature?  | yes| Tests pass?   | yes| License       | MIT| Doc PR        |symfony/symfony-docs#6946Tells dumpers when PHP identifiers are used so that they can shorten the namespace and create IDE links to the source.![capture du 2016-09-02 17-07-06](https://cloud.githubusercontent.com/assets/243674/18208461/df2c9684-712f-11e6-9fea-de13e21f86c3.png)(PR also embeds some fixes/cleanups)Commits-------788f7e8 [VarDumper] Add ClassStub for clickable & shorter PHP identifiers
// $output is now populated with the dump representation of $variable

..versionadded::3.2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this empty line has to be removed

@wouterj
Copy link
Member

status: needs work

@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedSep 14, 2016
edited
Loading

comments addressed

@wouterj
Copy link
Member

👍
status: reviewed

Whatever the cloned data structure, resulting ``Data`` objects are always
serializable.

A cloner applies limits when creating the representation, so that the one
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

[...] the cloned one [...]

$output = $dumper->dump($cloner->cloneVar($variable), true);

..versionadded::3.2
The ability to return as string was introduced in Symfony 3.2.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

[...] to return a string [...]


Before writing your own casters, you should check the existing ones.

Adding semantics with metadata
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Adding Semantics with Metadata


Since casters are hooked on specific classes or interfaces, they know about the
objects they manipulate. By altering the ``$stub`` object (the third argument of
any casters), one can transfer this knowledge to the resulting ``Data`` object,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

any caster

@nicolas-grekas
Copy link
MemberAuthor

addressed

@javiereguiluz
Copy link
Member

👍

@xabbuh
Copy link
Member

Thank you Nicolas.

@xabbuhxabbuh merged commit3033bc7 intosymfony:masterOct 14, 2016
xabbuh added a commit that referenced this pull requestOct 14, 2016
…kas)This PR was merged into the master branch.Discussion----------[VarDumper] Adding semantics with metadataCommits-------3033bc7 [VarDumper] Adding semantics with metadata
@nicolas-grekasnicolas-grekas deleted the var-dumper-32 branchOctober 21, 2016 06:23
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh left review comments

@wouterjwouterjwouterj approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@nicolas-grekas@wouterj@javiereguiluz@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp