Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98658 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2671 invoked from network); 28 Mar 2017 16:41:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Mar 2017 16:41:37 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.176 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.220.176 mail-qk0-f176.google.com Received: from [209.85.220.176] ([209.85.220.176:33796] helo=mail-qk0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/15-61593-0429AD85 for ; Tue, 28 Mar 2017 11:41:36 -0500 Received: by mail-qk0-f176.google.com with SMTP id d10so64704427qke.1 for ; Tue, 28 Mar 2017 09:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=79YerWJg/MdYmyQe7XnSgRl+kVPhfALCB18biNPIIWw=; b=rNF9DSCSObNnXWOexWz3yjU5tLVUnc7W2ZLNe5oastQf/NvCiM+PQTerczqMTZbul/ zOwdSFgHDDRz5x2fEkqVvvDbBPevx+sNHV0l+52TaWQe3LTPQaR0BrK4LSEBtb+BmXmr qiL0BVpoo56GEEMNJohlkD9yQtuwm0246bHhAnmVGMrYPC+soOqjJL/WExAIkKGKy5v+ 5UTPxy0nx+WLu8jkOwjdXHqKG+PRCG9PcddzFLrsiUEScuociu5U2iB9E4xG+cyhPii5 Ve19L0vHBkj9iAuZ1lGejKbeFnxdkT2FD5WbhQ7eudJyOHguSZ4L81SRvvD2etrz8Pvf /wqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=79YerWJg/MdYmyQe7XnSgRl+kVPhfALCB18biNPIIWw=; b=mztnX4CI1Hbs9e2DCXL/I9VCkAeSs7iQYe+o9ynwgpucIhOhCK3obRb7yrS8/H8/tc +YYzGFDYWFFVg+dwq4JDD4vUdFUodk/cuAVC1uScd69bS7B9uGwBzxvlwX6/nfmCHZxJ /XzafFk9CyivasK8e2RZkinEDc0PfPrRzivwOb9E6nlc7W2xlY1KWamCUST3EsUwpEVV 7Q0cO/RIkgM0G9/SaYDFBo/hkDSw0M4glAunNYIcBbscoVEj5b3Ci+Ragg+ysWTyeHwQ 8skdyKsAJgEiCo0gNIRG/oJLJdMnOF0VSfM4ZTNOPV0ptqaGSFfR2W/41lpKm/ZRmUZm 5AXQ== X-Gm-Message-State: AFeK/H1yfoQk8XID0h9ctx4vx5obdWN+NHVfaAbDnFgNb6ezrQTp7gkgsbuG2Rubc0EoiV/7hiwDcNFQ4KKEkg== X-Received: by 10.233.222.69 with SMTP id s66mr28865682qkf.126.1490719293617; Tue, 28 Mar 2017 09:41:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.44.70 with HTTP; Tue, 28 Mar 2017 09:41:13 -0700 (PDT) In-Reply-To: <59a94e8d-5a2e-bcee-4918-362b1d6bebf8@fleshgrinder.com> References: <59a94e8d-5a2e-bcee-4918-362b1d6bebf8@fleshgrinder.com> Date: Tue, 28 Mar 2017 13:41:13 -0300 Message-ID: To: PHP Internals List Cc: Wes Content-Type: multipart/alternative; boundary=94eb2c0438e8f556ad054bcd212f Subject: Re: [PHP-DEV][RFC][VOTE] Allow abstract function override From: ocramius@gmail.com (Marco Pivetta) --94eb2c0438e8f556ad054bcd212f Content-Type: text/plain; charset=UTF-8 Hey Folks, Sorry, my mistake on detecting the BC break. I had a misconception about how `ReflectionMethod#getDeclaringClass()` works. I thought that the declaring class was the declaring abstraction, but it's actually always pointing to the most concrete implementation in the inheritance. See https://3v4l.org/t7PiL Code, for reference: getMethod('bar')->getDeclaringClass()->getName()); // expected `Foo`, it actually is `Foo` var_dump((new ReflectionClass(Bar::class))->getMethod('bar')->getDeclaringClass()->getName()); // expected `Foo`, got `Bar` (my assumption was wrong) var_dump((new ReflectionClass(Baz::class))->getMethod('bar')->getDeclaringClass()->getName()); // expected `Foo`, got `Baz` (my assumption was wrong) This is my mistake, as I didn't verify my assumption on code before reporting the BC break. Sorry again - changing my vote to `yes`, as the discussed covariance/contravariance changes make sense for interfaces as well. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --94eb2c0438e8f556ad054bcd212f--