Skip to content

[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

Merged
merged 1 commit into from
Aug 23, 2016

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Aug 22, 2016

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

@@ -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
Copy link
Member

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

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

@nicolas-grekas nicolas-grekas merged commit feb2cd0 into symfony:2.7 Aug 23, 2016
nicolas-grekas added a commit that referenced this pull request Aug 23, 2016
…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
@nicolas-grekas nicolas-grekas deleted the fix-72 branch August 23, 2016 06:53
This was referenced Sep 2, 2016
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.

4 participants