Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86997 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43613 invoked from network); 2 Jul 2015 13:34:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2015 13:34:50 -0000 Authentication-Results: pb1.pair.com header.from=phofstetter@sensational.ch; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=phofstetter@sensational.ch; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sensational.ch designates 195.226.6.199 as permitted sender) X-PHP-List-Original-Sender: phofstetter@sensational.ch X-Host-Fingerprint: 195.226.6.199 mail.sensational.ch Received: from [195.226.6.199] ([195.226.6.199:46163] helo=mail.sensational.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/97-20693-5FD35955 for ; Thu, 02 Jul 2015 09:34:48 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:34066) by mail.sensational.ch with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.76 and XAMS 0.0.20) id 1ZAedX-0005jA-1N for internals@lists.php.net; Thu, 02 Jul 2015 15:34:43 +0200 Received: by wgqq4 with SMTP id q4so63470211wgq.1 for ; Thu, 02 Jul 2015 06:34:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=1fRaJDVGt8xd8M6aNE9eOwP1YE/zVFtXEixMPTPMlLQ=; b=fbXV5Cbk4mXvAgtA4GjRX/NlhuvxyqBaPV+OMowZJdtgzfJJt6heLpQ1vRVyGYpic5 WVqGY2YFYUTgWHoi79C2dvpNUkv2+toti41Zku0I9h3d+QjrgYsIT0BskJjB6HZFOrLc MmihCtbYGpnG+WIIIdfNYJfwbH9beuZyujSOmz6ClQumJnOKGFixRRUIthX4pOcdcNck mzhGyiA+JWlyBa+tFHJG/kkZWkCoFqpKhdg3HafdNST3VX4o4uO7yQKkbVlQ1lVJ1zX+ vZNMXQOyHwffKYlzWT5j8p9207HAHrmemzd8lHFF9XP2j+LSW6MdpmNH31QcG+j7rcPl vMuw== X-Gm-Message-State: ALoCoQlZRlK6BD7waYw9jea1yBwmCF6X81Gxxl5BbWoJsbetVnrMjS48vp035g47SIdhL7nrhYwC2XQMVCSL7zNWlDUrtaQvsJGLZuzYtiU/vx+j4/xKRcDF1AS+6GgEpdoMHnV4JeonZXW59nfRFpsKr/hVKgIH8g== X-Received: by 10.180.206.229 with SMTP id lr5mr53428372wic.86.1435844082785; Thu, 02 Jul 2015 06:34:42 -0700 (PDT) X-Received: by 10.180.206.229 with SMTP id lr5mr53428351wic.86.1435844082675; Thu, 02 Jul 2015 06:34:42 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 02 Jul 2015 13:34:33 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=001a11c38a228044770519e48074 X-SA-Do-Not-Run: Yes X-SA-Exim-Connect-IP: 74.125.82.43 X-SA-Exim-Mail-From: phofstetter@sensational.ch X-SA-Exim-Scanned: No (on mail.sensational.ch); SAEximRunCond expanded to false Subject: date extension / Type Hinting From: phofstetter@sensational.ch (Philip Hofstetter) --001a11c38a228044770519e48074 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, as this probably requires some discussion, I'm coming here to ask. I'm talking about bug 69977 and 61483: Both are about the fact that it's currently not possible to properly type-hint descendant classes of DateTime and friends. The reason is the missing use ZEND_ARG_OBJ_INFO, so right now, users can only create descendant classes without any type hinting on their methods. Adding the ZEND_ARG_OBJ_INFO is quite trivial and in-fact, I have a branch here that does it: https://github.com/pilif/php-src/tree/bug-69977 Of course this is going to break a whole lot of tests because what was once warnings is now a TypeError. I'd be willing to update all the tests as needed, but of course changing the behaviour like this is a BC issue in itself, hence I'm coming here. The reason why I think this matters much more now than back when 61483 was submitted is two-fold: 1) back in 61483, adding the (correct!) type-hints was "just" causing an E_STRICT message. But now with PHP7 it's actually an E_WARNING. So people running without E_STRICT enjoyed correct type hints until now which they now can't any more (so, there's another BC break right there :p) 2) With PHP7 type hinting becomes much more viable, so forcing users to not type-hint something that really should be feels kind of ugly. 3) Having a new major release is as good a time as any for chaning the behaviour, especially when the change is related to a major new feature (the addition of much stricter typing). So I'm asking for opinions on what should be done here. Again: If you lean /at all/ in the direction of changing this, I volunteer to update all the tests as required. Philip --=20 Sensational AG Giessh=C3=BCbelstrasse 62c, Postfach 1966, 8021 Z=C3=BCrich Tel. +41 43 544 09 60, Mobile +41 79 341 01 99 info@sensational.ch, http://www.sensational.ch --001a11c38a228044770519e48074--