Uh oh!
There was an error while loading. Please reload this page.
Fix GH-11310: __debugInfo() does nothing on classes extending DateTime - #12534
Fix GH-11310: __debugInfo() does nothing on classes extending DateTime#12534paulfedorow wants to merge 1 commit into
Conversation
1ee23d1 to
46a5da4CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…Time Makes the `__debugInfo` method work in classes that extend `DateTime` and `DateTimeImmutable`. * Implemented `__debugInfo` for `DateTime` and `DateTimeImmutable`. * Modified the `get_properties_for` handlers of `DateTime` and `DateTimeImmutable` to invoke `__debugInfo`.
46a5da4 to
54f607dCompare
derickr
left a comment
There was a problem hiding this comment.
Is this not needed for the other Date classes?
| public function __unserialize(array $data): void {} | ||
| /** @tentative-return-type */ |
There was a problem hiding this comment.
Why does this have @tentative-return-type?
prescriptionlifeline
commented
Jul 7, 2024
Any update on this? |
kocsismate
commented
Oct 1, 2024
@paulfedorow Could you please rebase + update your PR according to Derick's comment? Since it seems like a useful fix (btw the same inconsistency exists in other places), so I'll finish it if you don't have time for this anymore. |
| } | ||
| } | ||
| class MyDateTimeZone extends DateTimeZone { |
There was a problem hiding this comment.
suggest adding a test case for MyDateTimeZone, otherwise why define the class at all?
DanielEScherzer
commented
Oct 9, 2024
Note that my patch at #16333 should fix this in a more general way |
paulfedorow
commented
Oct 10, 2024
I'm closing this in favor of the more general fix provided in #16333 |
DanielEScherzer
commented
Oct 10, 2024
Actually my comment may have been a bit premature, it seems that my more general approach may not be desirable |
FixesGH-11310. Makes the
__debugInfomethod work in classes that extendDateTimeandDateTimeImmutable.__debugInfoforDateTimeandDateTimeImmutable.get_properties_forhandlers ofDateTimeandDateTimeImmutableto invoke__debugInfo.