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

Skip to content

[VarDumper] Fix dumping ArrayObject and ArrayIterator instances #27591

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
Jun 15, 2018

Conversation

nicolas-grekas
Copy link
Member

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

Properties added on child classes of ArrayObject and ArrayIterator, or dynamic properties added on instances of them were now properly dumped. This fixes it.

image

@@ -27,30 +27,25 @@ class SplCaster
\SplFileObject::READ_CSV => 'READ_CSV',
);

public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested)
public static function castArrayObject($c, array $a, Stub $stub, $isNested)
Copy link
Member

Choose a reason for hiding this comment

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

Now that this method supports more than just ArrayObject, it should be renamed, right?

Copy link
Member

Choose a reason for hiding this comment

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

Or for BC, we can probably keep this method signature as is and create a castArrayIterator one and both calling a private one?

@nicolas-grekas
Copy link
Member Author

updated

Status: needs review

Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

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

Please add tests covering these cases

@nicolas-grekas
Copy link
Member Author

@stof tests added

@nicolas-grekas nicolas-grekas merged commit 3ecabfc into symfony:2.8 Jun 15, 2018
nicolas-grekas added a commit that referenced this pull request Jun 15, 2018
…ances (nicolas-grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Fix dumping ArrayObject and ArrayIterator instances

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

Properties added on child classes of `ArrayObject` and `ArrayIterator`, or dynamic properties added on instances of them were now properly dumped. This fixes it.

![image](https://user-images.githubusercontent.com/243674/41349429-2660cbc6-6f10-11e8-8015-a3d6ad8b0c9c.png)

Commits
-------

3ecabfc [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
@nicolas-grekas nicolas-grekas deleted the dump-arrayiterator branch June 15, 2018 10:41
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