Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[VarDumper] Add and use Caster::PREFIX_* consts #14079

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
merged 1 commit into from
Mar 31, 2015

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Will need a rebase on top of #14058 once it is merged

);
if (!($filter & Caster::EXCLUDE_VERBOSE)) {
$a += array(Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML());
}

$dom->formatOutput = $formatOutput;
Copy link
Member

Choose a reason for hiding this comment

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

I suggest moving the changing of formatOutput and its resetting to the previous value inside the if (!($filter & Caster::EXCLUDE_VERBOSE)) { check as it is needed only for the saveXML call AFAIK

Copy link
Member Author

Choose a reason for hiding this comment

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

good idea, done

break;
case isset($k[1]) && "\0" === $k[0]:
switch ($k[1]) {
case '~': $type = self::EXCLUDE_VIRTUAL; break;
Copy link
Member

Choose a reason for hiding this comment

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

I would make this multiline to make it more readable (seeing easily that we have some login in the case, not only a condition falling through to the next case).
currently, the code here is very similar to the code on lines 85 and 86 at first look, while the structure of the code is actually totally different

Copy link
Member

Choose a reason for hiding this comment

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

I would make this multiline to make it more readable (seeing easily that we have some login in the case, not only a condition falling through to the next case).
currently, the code here is very similar to the code on lines 85 and 86 at first look, while the structure of the code is actually totally different

@nicolas-grekas nicolas-grekas force-pushed the caster-prefix branch 3 times, most recently from 43d0032 to c9ca534 Compare March 27, 2015 18:26
@nicolas-grekas nicolas-grekas changed the title [VarDumper] Add and use of Caster::PREFIX_* consts [VarDumper] Add and use Caster::PREFIX_* consts Mar 29, 2015
@nicolas-grekas
Copy link
Member Author

This now needs a rebase on top of #14114 before being merged

@nicolas-grekas
Copy link
Member Author

Tests are green, ready for a merge, ping @symfony/deciders

@stof
Copy link
Member

stof commented Mar 31, 2015

👍

@@ -46,7 +46,7 @@ class AmqpCaster

public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested)
{
$prefix = "\0~\0";
$p = Caster::PREFIX_VIRTUAL;
Copy link
Member

Choose a reason for hiding this comment

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

Can't we keep the old variable name? To me, $prefix is more meaningful than a one-character variable name.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we can, done in fact

@xabbuh
Copy link
Member

xabbuh commented Mar 31, 2015

👍

@nicolas-grekas nicolas-grekas merged commit 86cf8de into symfony:2.7 Mar 31, 2015
nicolas-grekas added a commit that referenced this pull request Mar 31, 2015
…as-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Add and use Caster::PREFIX_* consts

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Will need a rebase on top of #14058 once it is merged

Commits
-------

86cf8de [VarDumper] Make use of Caster::PREFIX_* consts
@nicolas-grekas nicolas-grekas deleted the caster-prefix branch March 31, 2015 15:04
nicolas-grekas added a commit that referenced this pull request Apr 1, 2015
…as-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Add casters for Reflection* classes

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Will need a rebase on top of #14079 and #14077 to be mergeable/green.

Commits
-------

64d6e76 [VarDumper] Add casters for Reflection* classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants