Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49470 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81792 invoked from network); 19 Aug 2010 21:10:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2010 21:10:49 -0000 Authentication-Results: pb1.pair.com header.from=nrixham@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=nrixham@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: nrixham@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:46891] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/1B-00261-8DD9D6C4 for ; Thu, 19 Aug 2010 17:10:49 -0400 Received: by wwb17 with SMTP id 17so1899285wwb.11 for ; Thu, 19 Aug 2010 14:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=v3Kw5kM6PaxVp9J22INDtQer1G+h3ssQ2RJ1T8eOcfw=; b=cQaN5ezzTIQivwuOkhbUW7TWWvzIzeydF1BXYYrPfFtujloz5m22AFKrfyULi5YQFz AOS+u1Ykaf2lT4Ea4XbE1T9b7ESgI2u0Dh+kzG3LpWrYLSnhkHYGIizIh6J/UDP6LUCV 1aOXkWKkn85YaACxc2vC7gPhq8gxm4fG1OMCQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Q+nuq7PLF637iP6CWl4ftcqEZt5Ra5wiqSaEVQ9to3OUkiXEyB2WQNm4wGkMY5mtHN df4jOfNahswDPBd7WmnfsbF6BEegDO6fw8iZLrxh3vT5cpcd/I4CRelEW7hYAPD1MCtV 2s7hxlCEe4bOeVkjh+rPByOstrKMZQJYM2JC8= Received: by 10.227.157.138 with SMTP id b10mr385158wbx.13.1282252246225; Thu, 19 Aug 2010 14:10:46 -0700 (PDT) Received: from [192.168.1.69] (host86-169-12-34.range86-169.btcentralplus.com [86.169.12.34]) by mx.google.com with ESMTPS id e31sm1763843wbe.17.2010.08.19.14.10.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Aug 2010 14:10:45 -0700 (PDT) Message-ID: <4C6D9DAF.9030108@gmail.com> Date: Thu, 19 Aug 2010 22:10:07 +0100 Reply-To: nrixham@gmail.com User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Chris Stockton CC: Zeev Suraski , "Ionut G. Stan" , internals@lists.php.net, smalyshev@sugarcrm.com, Dave Ingram References: <4C6CE273.2070501@sugarcrm.com> <4C6CE604.1010209@dmi.me.uk> <4C6CE793.1020601@sugarcrm.com> <1282206735.2561.11.camel@guybrush> <4C6CF898.5060706@gmail.com> <4C6D2EB8.30700@gmail.com> <4C6D39EA.4000705@gmail.com> <7.0.1.0.2.20100819181013.18df1df8@zend.com> <4C6D86FF.7050503@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] inheritance check too strict? From: nrixham@gmail.com (Nathan Rixham) Chris Stockton wrote: > Hello, > > On Thu, Aug 19, 2010 at 12:33 PM, Nathan Rixham wrote: >> Guys, this is going a bit nuts, let's swap all the Foo and Bar's for a real >> example - Zeev I've copied the way you specified above. > > I think your misunderstanding his position. To summarize my > understanding: he clearly states that in such a use case a warning is > in order, however currently the warning is overly aggressive. I think > in general this is a small fish in the pond but I see his point. > Perhaps I am, I think his example was wrong - if it was an example of doing it the wrong way and an example which should trigger a warning then yes I totally agree. To clarify, hopefully - given: class Point2D {} class Point3D extends Point2D {} the following is incorrect and should raise a (heavy) warning (Zeev's example with class names changed for clarity): class Point2DManager { public function distanceBetween( Point3D $p1 , Point3D $p2 ) {}; } class Point3DManager extends Point2DManager { public function distanceBetween( Point2D $p1 , Point2D $p2 ) {}; } whilst the following is correct, and should not raise any warning: class Point2DManager { public function distanceBetween( Point2D $p1 , Point2D $p2 ) {}; } class Point3DManager extends Point2DManager { public function distanceBetween( Point3D $p1 , Point3D $p2 ) {}; } If we're all saying the same thing then great and apologies for the confusion. Best, Nathan