Skip to content
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

[VarDumper] Fix dumping ArrayObject with DumpDataCollector #50960

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Jul 12, 2023

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #50940
License MIT
Doc PR -

The main problem here is that the ArrayObjectstorage key in the array returned by __debugInfo() seems to be a reference: https://3v4l.org/8rSFn (a bug in PHP perhaps?)

Since the DumpDataCollector does the actual dumping in the __destructor() the ArrayObjectstorage is modified by then which messes with the object created by the VarCloner.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

nice thanks!

Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

Yeah! Thanks

@nicolas-grekas
Copy link
Member

Thank you @HypeMC.

@nicolas-grekas nicolas-grekas merged commit 23da9db into symfony:5.4 Jul 13, 2023
6 of 9 checks passed
@HypeMC HypeMC deleted the fix-dumping-arrayobject branch July 13, 2023 09:22
This was referenced Jul 29, 2023
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