Skip to content

Fix #69264: __debugInfo() ignored while extending SPL classes #5333

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

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Apr 1, 2020

We have to call ::__debugInfo(), if defined for SPL descendants.


I have some doubts regarding the BC break, particularly since it would be no longer possible to call the inherited ::__debugInfo(), because it is actually not inherited; only the get_debug_info handlers are implemented.

Thoughts?

We have to call `::__debugInfo()`, if defined for SPL descendants.
@nikic
Copy link
Member

nikic commented Apr 1, 2020

I would recommend actually implementing __debugInfo() instead, and dropping get_debug_info().

@cmb69
Copy link
Member Author

cmb69 commented Apr 3, 2020

I would recommend actually implementing __debugInfo() instead, and dropping get_debug_info().

I agree that this is cleaner, but would be a BC break regarding the var_dump() output (see PR #5342).

@cmb69
Copy link
Member Author

cmb69 commented Apr 3, 2020

Closing in favor of PR #5342, which doesn't have the misbelieved BC issue.

@cmb69 cmb69 closed this Apr 3, 2020
@cmb69 cmb69 deleted the cmb/69264 branch April 3, 2020 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants