Req #79228 [Opn->Wfx]: Allow DateTimeInterface to be implemented in userland
| From: | derick@php.net | Date: | Sun, 05 Jun 2022 14:33:50 +0000 |
| Subject: | Req #79228 [Opn->Wfx]: Allow DateTimeInterface to be implemented in userland | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-241675@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79228&edit=1
ID: 79228
Updated by: derick@php.net
Reported by: eric at ericstern dot com
Summary: Allow DateTimeInterface to be implemented in
userland
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: Date/time related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This can not be done, as the DateTime extension requires internal information to be present for
classes that implement DateTimeInterface, and this internal (C-based) information can not be
provided by user-land.
Previous Comments:
------------------------------------------------------------------------
[2020-02-05 01:21:06] requinix@php.net
Happened during bug #65768 "because ext/date relies on classes implementing it to support
certain internal structures".
https://git.php.net/?p=php-src.git;a=commit;h=5f09944662e09ea0b3f93cfab8702f188955e68c
------------------------------------------------------------------------
[2020-02-05 00:59:46] eric at ericstern dot com
Description:
------------
Since DateTimeInterface has a restriction that it cannot be implemented in user space, certain
operations (especially in testing) become unnecessarily difficult. It would be great if a future
version of PHP lifted this restriction.
Test script:
---------------
https://github.com/sebastianbergmann/phpunit/issues/3680
is an example of why this is a real-world issue.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79228&edit=1