Re: DateTimeInterface is not a usable interface?

From: Date: Tue, 21 Jul 2015 11:56:50 +0000
Subject: Re: DateTimeInterface is not a usable interface?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-87221@lists.php.net to get a copy of this message
On Tue, 21 Jul 2015, Marco Pivetta wrote: > I should also add that this breaking change was introduced in a patch > release (5.5.8). That wasn't good, but I don't see how it was a *breaking* change. It never worked before this change either. You now just told you're doing something inappropriate. > What has happened has happened, and I don't want to blame anyone, but > this is actually really broken :-\ It's not a check that can be easily removed though. As Nikita says, this all operate on internal structures. DateTimeInterface is meant so that both DateTime and DateTimeImmutable can be type hinted for, and not really for user land. Retrofitting PHP's DateTime stuff with user extended classes and implementations is not going to be a trivial thing. cheers, Derick

« previous php.internals (#87221) next »