Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56520 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65374 invoked from network); 23 Nov 2011 18:25:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2011 18:25:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=ralph@ralphschindler.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ralph@ralphschindler.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ralphschindler.com from 209.85.213.42 cause and error) X-PHP-List-Original-Sender: ralph@ralphschindler.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:51736] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/B2-47904-3AA3DCE4 for ; Wed, 23 Nov 2011 13:25:40 -0500 Received: by ywt2 with SMTP id 2so1099378ywt.29 for ; Wed, 23 Nov 2011 10:25:37 -0800 (PST) Received: by 10.236.72.167 with SMTP id t27mr35648502yhd.127.1322072737152; Wed, 23 Nov 2011 10:25:37 -0800 (PST) Received: from ralph-mac.local (ip174-73-14-247.no.no.cox.net. [174.73.14.247]) by mx.google.com with ESMTPS id i50sm26242549yhk.11.2011.11.23.10.25.35 (version=SSLv3 cipher=OTHER); Wed, 23 Nov 2011 10:25:36 -0800 (PST) Message-ID: <4ECD3A9E.7090105@ralphschindler.com> Date: Wed, 23 Nov 2011 12:25:34 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Pierre Joye CC: Derick Rethans , internals References: <4EC578C9.4000408@ralphschindler.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Changes to constructor signature checks From: ralph@ralphschindler.com (Ralph Schindler) Internals: Time to summarize. It is clear to me that internals is divided on this issue. I don't think it's a large enough issue to drag on, even when I disagree with it - both theoretically and in practice. For most OO developer, putting ctors as an abstract or in an interface would not happen anyway, so this does not affect them. ** The current change represents a minor break in BC, that should be noted in the manual. ** Also, a decision needs to be made on what to do with grandchildren. As I mentioned, the following produces no E_FATAL and no warnings: abstract class A { abstract public function __construct($a, $b); } class B extends A { public function __construct($a, $b) {} } class C extends B { public function __construct(ArrayObject $d) {} While this is correct behavior to me (ability for concrete to use its own ctor), using the *current logic* strict signature checking enforced from an abstract, then the above is also wrong. ** Can we decide what to do with that situation? ** On 11/18/11 5:05 AM, Pierre Joye wrote: > I strongly disagree, this encourages bad practices. We could however > reduce the error level to warning. I think this is a sufficient compromise- I don't see anything E_FATAL about a signature change in ctors (I actually see nothing wrong with it, but it's clear the community is divided there). ** Can we make that change? ** Thanks, -ralph