-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
121f2bb
to
3281487
Compare
); | ||
if (!($filter & Caster::EXCLUDE_VERBOSE)) { | ||
$a += array(Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()); | ||
} | ||
|
||
$dom->formatOutput = $formatOutput; |
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.
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
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.
good idea, done
3281487
to
a0feffb
Compare
break; | ||
case isset($k[1]) && "\0" === $k[0]: | ||
switch ($k[1]) { | ||
case '~': $type = self::EXCLUDE_VIRTUAL; break; |
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.
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
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.
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
43d0032
to
c9ca534
Compare
c9ca534
to
56a3863
Compare
This now needs a rebase on top of #14114 before being merged |
56a3863
to
11e7a66
Compare
Tests are green, ready for a merge, ping @symfony/deciders |
👍 |
@@ -46,7 +46,7 @@ class AmqpCaster | |||
|
|||
public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested) | |||
{ | |||
$prefix = "\0~\0"; | |||
$p = Caster::PREFIX_VIRTUAL; |
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.
Can't we keep the old variable name? To me, $prefix
is more meaningful than a one-character variable name.
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.
Yes we can, done in fact
11e7a66
to
86cf8de
Compare
👍 |
…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
…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
Will need a rebase on top of #14058 once it is merged