Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56801 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99054 invoked from network); 6 Dec 2011 13:55:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Dec 2011 13:55:02 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-ee0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:57855] helo=mail-ee0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/50-30975-5BE1EDE4 for ; Tue, 06 Dec 2011 08:55:01 -0500 Received: by eekc13 with SMTP id c13so909611eek.29 for ; Tue, 06 Dec 2011 05:54:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=DEdKsvN3xnRYtALaiNRZC48fI9MYiXHi761XSUCvHA0=; b=X9O6CRVlMA/zVW82EQfm3O2Yj6B83XgqyE2eeNj3m9NQn1Q+kraAEE/XE8vuadhHOL aOsg4gDMfy92l0v8fgel/oUVhlqz3R7GNrRx0tFp7aSnmYORd29+4Zj8qpsE0/f39Liq 0xxpf1JH68rlj1FmclW5DQHhM2osWIgExLMYI= Received: by 10.14.9.23 with SMTP id 23mr24852ees.46.1323179698641; Tue, 06 Dec 2011 05:54:58 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.213.9.206 with HTTP; Tue, 6 Dec 2011 05:54:17 -0800 (PST) Date: Tue, 6 Dec 2011 14:54:17 +0100 X-Google-Sender-Auth: 0L75Wl3J7IM04iccuG5wnCtSe54 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016363ba684e95d7904b36cc7ae Subject: One more Liskov Subs. and parameter checking notice From: jpauli@php.net (jpauli) --0016363ba684e95d7904b36cc7ae Content-Type: text/plain; charset=ISO-8859-1 Greetings PHP Intern@ls :) There is a PHP behavior I disagree with regarding OO model. It's been here for a long time (5.0 ??, at least 5.2, 5.3 and 5.4) , here it is : Strict Standards: Declaration of Foo2::bar() should be compatible with that of Foo::bar() I find this wrong. Liskov (and the error message) says we must stay "compatible" in our inheritence. The fact is that we are in the code above : - A uses IfaceA - B extends A - B should be able to overwrite A's method typing their IfaceA params on IfaceB, if IfaceB extends IfaceA (and is thus compatible with it). Thoughts ? Julien.Pauli --0016363ba684e95d7904b36cc7ae--