Skip to content

Conversation

DanielEScherzer
Copy link
Member

For classes that extend SplFixedArray and define a __debugInfo() magic method, use it.

…sses

For classes that extend `SplFixedArray` and define a `__debugInfo()` magic
method, use it.
@TimWolla
Copy link
Member

I wonder if when touching the code anyway it would make sense to actually implement __debugInfo(), like it is done for e.g. all the random engines, or HashContext (#14644). This would make internal classes behave more similar to userland classes.

@DanielEScherzer
Copy link
Member Author

Maybe we should add something to php/php-tasks for going through and adding that to every internal class? Right now I just want to get the subclasses to work, I'm not entirely sure what each parent class (SplFixedArray, in this case) should be returning

@Girgias
Copy link
Member

Girgias commented Oct 23, 2024

I think the "issue" is that there exists an object handler when it probably should not even be called and a proper __debugInfo() method be implemented which does the same thing.

And this would align the behaviour of internal and userland classes more like @TimWolla already mentionned.

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.

3 participants