-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
@@ -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) |
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.
Now that this method supports more than just ArrayObject
, it should be renamed, right?
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.
Or for BC, we can probably keep this method signature as is and create a castArrayIterator
one and both calling a private one?
updated Status: needs review |
70dc6e4
to
1ad0d6d
Compare
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.
Please add tests covering these cases
1ad0d6d
to
89aaae9
Compare
@stof tests added |
89aaae9
to
3ecabfc
Compare
…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.  Commits ------- 3ecabfc [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
Properties added on child classes of
ArrayObject
andArrayIterator
, or dynamic properties added on instances of them were now properly dumped. This fixes it.