-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes (aka "small-bc-breaks") #19702
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
@@ -263,7 +263,10 @@ private function flattenArgs($args, $level = 0, &$count = 0) | |||
if (++$count > 1e4) { | |||
return array('array', '*SKIPPED over 10000 entries*'); | |||
} | |||
if (is_object($value)) { | |||
if ($value instanceof \__PHP_Incomplete_Class) { | |||
// Special case of object, is_object will return false |
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.
you should update the comment, as it will be a lie on PHP 7.2 currently
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.
indeed, fixed
@@ -263,7 +263,10 @@ private function flattenArgs($args, $level = 0, &$count = 0) | |||
if (++$count > 1e4) { | |||
return array('array', '*SKIPPED over 10000 entries*'); | |||
} | |||
if (is_object($value)) { | |||
if ($value instanceof \__PHP_Incomplete_Class) { | |||
// Special case of object, is_object will return false until PHP 7.1 |
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.
is_object returns false until PHP 7.1
?
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.
updated
…hanges (aka "small-bc-breaks") (nicolas-grekas) This PR was merged into the 2.7 branch. Discussion ---------- [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes (aka "small-bc-breaks") | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | Tests pass? | yes | License | MIT On PHP 7.2: - `is_object()` is going to return `true` for `__PHP_Incomplete_Class` instances - `gettype($closed_resource);` returns "resource (closed)" ping @nikic FYI see https://travis-ci.org/symfony/symfony/jobs/154114269 for fixed tests (except the one on ClassLoader which is a BC break on 7.1 that should be fixed there IMHO). Commits ------- feb2cd0 [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
On PHP 7.2:
is_object()
is going to returntrue
for__PHP_Incomplete_Class
instancesgettype($closed_resource);
returns "resource (closed)"ping @nikic FYI
see https://travis-ci.org/symfony/symfony/jobs/154114269 for fixed tests (except the one on ClassLoader which is a BC break on 7.1 that should be fixed there IMHO).