On 21 July 2015 at 12:56, Derick Rethans <der...@php.net> wrote: > 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. >
It's an interface, it doesn't "work", it simply gets implemented (then the implementing code "works"). > > 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. > Then make DateTime and DateTimeImmutable only interact with DateTime and DateTimeImmutable (or child classes), but don't rely on the interface if you're not actually respecting it internally in first place, no? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/