Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87221 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95757 invoked from network); 21 Jul 2015 11:56:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2015 11:56:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:35650] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/A3-03461-7833EA55 for ; Tue, 21 Jul 2015 07:56:56 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 8900DE20D6; Tue, 21 Jul 2015 12:56:51 +0100 (BST) Date: Tue, 21 Jul 2015 12:56:50 +0100 (BST) X-X-Sender: derick@whisky.home.derickrethans.nl To: Marco Pivetta cc: Niktia Nefedov , PHP Internals List In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] DateTimeInterface is not a usable interface? From: derick@php.net (Derick Rethans) 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