Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103037 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95258 invoked from network); 3 Aug 2018 18:22:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2018 18:22:39 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.21 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.21 mout.gmx.net Received: from [212.227.17.21] ([212.227.17.21:57107] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/6E-59628-D6D946B5 for ; Fri, 03 Aug 2018 14:22:38 -0400 Received: from [192.168.2.102] ([87.167.201.185]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MZPer-1fVUDP29c5-00LC9q; Fri, 03 Aug 2018 20:22:26 +0200 To: =?UTF-8?Q?Pedro_Magalh=c3=a3es?= , PHP internals References: Message-ID: <23921b52-76a1-f578-cf1d-568095c8a343@gmx.de> Date: Fri, 3 Aug 2018 20:22:27 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:ISGwDLe8DD6fbKQiloxiSySZqI1RGFaI6v8Qp+PHkTqRp77hKLK JjMubc0VWqgBylFkJxkwO7cVSJHgzZqLha9YfVWPqp/4BOfbaT1fKticVjXYdRZu0wqQ3PI /gHfCDSnVDRtNeLL9SnyeRo3xdeZ6OsI+9Dx3lQNTA2yq4ImZQgf1igFGG5MRaAVEbJdPM+ K914BHxlGftPivWt8ZN6A== X-UI-Out-Filterresults: notjunk:1;V01:K0:iiphI27GXSM=:TN6sIZhcZ/2VzpW25MeUQS thr7Rq8hMwkHcZYE9jA5AIiFenPUjiIp+96rvsBv2e+wKTPe8UvQk2N2a1yp9X9a7STemUSx6 m9OCepS307Xrq2sgV7M/Jiq5Xf46ZCrBJuyPCrMgiqLGjChWlP/wcMFqOoarEJUfwN+pwAa4M 1aEhInRYyJhB7zaP0hT3OKryJYS8NHdyOq95nnlSiHMRRBnI98jIPjTRpGGhlRK8URQo74+KK +M3RkgI3DCJiEQ61PgeTxzM9TxiONVeghLE0AZ+F0WsW53oMgi3px2BPJxelGSRV3fOsA119Z lAhay95NY8Qv8to8S3TPeJj8OUISw5Z5LIXb3G8oogk7hRLJZX50+56L1VUK12XNtjXiP+/pi xkDP6EMctdwAptG7ws81CzejR+udJxZwJRmHm5gA1oVkwwZClg/eKgR0KUs0Ka70uCKDKZoOy BypcC4Usmun675Pqph1diwQuk/UVPuujwgAkpxBzf2AWGdi8Q/BnFGi6TBYgYzgYvcHOef3pr 8QiDx4g7Y+lxez9YhNxswXKUPHQXN/PACVQpK6V4Ok2M66EI+xQE87KWlfaHRCidbwmvW44Jj 3smO+V8xP7DyacngQE6fSAgP+G6Oe/IMexmpsswlcFulbtz3owel1+GSvR64vmwbd3TCLTYD+ OYg91L/tSszW5foIhLlzb+RwUnR1++ujrLOkXFv5x/2FsmAJg0o+VBnwrxaFBom3lh/+KPpqI Nu8V4VIUQrGw/oCLoDuTMhXgplMHDmKKpHvYrGBzbsRnf7Qiltu1qwYuhz0nDaMTBQFXI6kOY i9Qfjgf Subject: Re: On abstract methods defined on traits From: cmbecker69@gmx.de ("Christoph M. Becker") On 03.08.2018 at 19:08, Pedro Magalhães wrote: > On the documentation about traits there is a mention to: "Traits support > the use of abstract methods in order to impose requirements upon the > exhibiting class." in > https://secure.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.abstract > > However, this is not true, and it has never been since traits were > introduced (https://3v4l.org/tYAmu). > > There is a related bug report in https://bugs.php.net/bug.php?id=75449 > > What currently happens is that (like with normal methods), the method on > the receiving class is used and the method from the trait is simply ignored. Yes. However, if the class using the trait would not implement the method, a compile time error would be thrown. > Although this can be fixed, I wanted your opinion on it as this would be > the only thing from traits that would impose anything on the receiving > class and conflicts with the normal precedence rules. Frankly, I don't understand what this bug report is about, looks pretty much expected (note that the error message is totally different from what has been reported; there is no class D in the reproduce script). -- Christoph M. Becker