Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103683 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2625 invoked from network); 4 Jan 2019 22:44:29 -0000 Received: from unknown (HELO mail-lf1-f47.google.com) (209.85.167.47) by pb1.pair.com with SMTP; 4 Jan 2019 22:44:29 -0000 Received: by mail-lf1-f47.google.com with SMTP id n18so26130230lfh.6 for ; Fri, 04 Jan 2019 11:17:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=PPEUat5yyel4lX+qvaWm7YSGfQGTNttYuduvwY766nk=; b=X96lQB1+nFPb6y8nH9TqB8lV62/EiiTKFZQMbS79mlQmdntNxPyFeYIHN+Z8UqsOT+ pDSkUzNE3hDruwWygc/U2Sd7SQOU20ypEVAi5jjL3Gcsl78eGifTjmIDr0x84X05C59i KDGUFKzenOWTAUzV7w5ou+Ag0lU3VkXc8Ah2nZnFOTO9AYmqhBPnu4ytvDSIwlQfsx9K UGYuyTxL4EEoGRuK9MYyAr/ZnSv++7Lh3eyjpPFGkKSkFLzCsO4c6SIjoocuzMJPw78X 5G8Rk9oAspfwJP2oG9xLmdN2nunb/RYKolO/aX22aP0GknFHb+epWThToKihgUC+Ulbz yvTA== X-Gm-Message-State: AA+aEWawOsWj1MjGwThiyPADgh+p1q8PGS0J3dNZYhfItoFkQFjPYkkJ W8qtYh91PILzCrUzrMejP6AFWRvme5iQFCxHEoOdgIc+ X-Google-Smtp-Source: AFSGD/XMXnwDQbPakyogzBDGIMpfuSSobNDiMlDhqVpak9sIrWuxEIsYFqFE/Jhlr6pFzM3uQDcMw6U99xyyPtW4gJI= X-Received: by 2002:a19:9fcd:: with SMTP id i196mr26205548lfe.82.1546629460174; Fri, 04 Jan 2019 11:17:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 4 Jan 2019 12:17:22 -0700 Message-ID: To: internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [RFC][Vote] Covariant Returns and Contravariant Parameters From: levim@php.net (Levi Morrison) On Thu, Jan 3, 2019 at 8:28 AM Levi Morrison wrote: > > On Wed, Dec 19, 2018 at 4:10 PM Levi Morrison wrote: > > > > Thank you for the feedback and discussion on the [Covariant Returns > > and Contravariant Parameters RFC][1]. > > > > I have opened [voting on this RFC][2]. Given that this is a common > > time for holidays for many people around the world it will be open > > until at least January 2nd. Happy holidays! > > > > [1]: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters > > [2]: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters#voting > > Currently there are 31 yes votes, and only 1 no vote. I will leave the > vote open for a few more days while I examine an issue that Dmitry > mentioned here on the list. When we have code like the following, no > errors or warnings are generated but there should be a warning: > > class A {} > class X { > function m(A $z) {} > } > class Y extends X { > function m(NotAnA $z) {} > } > ?> > > I am intentionally not generating a warning at runtime for some cases. > The engine already issues a warning at compile time for some similar > cases and I didn't want to duplicate the warning at runtime. > Apparently this code is not precise enough. I have a new pull request: https://github.com/php/php-src/pull/3732 This fixes all currently known issues with the implementation, including the snippet from my last message. There are a few todo items left that may have issues, but so far we haven't hit those cases in any code. I intend to close the vote in a day or two, unless I hear of new issues from Dmitry or others.