Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112138 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20002 invoked from network); 28 Oct 2020 18:19:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Oct 2020 18:19:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B32A11804B5 for ; Wed, 28 Oct 2020 10:38:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 28 Oct 2020 10:38:54 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id k18so78426wmj.5 for ; Wed, 28 Oct 2020 10:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=DWRrBA1MPJ3qRmEqr+rGg3ADR7MLWyc507n24whoIqQ=; b=DzdGHvxDKhohBSzOnOZy+zPu74HJLAty9fF8KM8VRRut8rbhvL4JhWFL17hK8HJuwl 3B16FGn6HGeIKAjqoHRys+/CLD+4knVU3cOJ6uprtmGJcrMIC7Wf0fbcnGqAIK3ez2gz tASEe++jVvO0GRmtXcrHI6dGvXbgsGmrltdGzvw+H8r0V9DmhPE78Om6gnPMlzaPprL2 JudyQ42ZUnFS0QWco74xtMvaIQtEOA8u5u2meDGyi9bMNNTJb3hbV8L0qBdJzPXPswIa nXoow7WslIS+rlFLjDJDzYnKdiQy+Gz8JpC18ut3MX9YsnfJGmoBetrNyO3Rkpy3XALA f6SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=DWRrBA1MPJ3qRmEqr+rGg3ADR7MLWyc507n24whoIqQ=; b=SRmpm1a2a6U4KPaRN9fdsi4fyX+TXsRk+0Kp9Fstx0DtNZuLycjtl4RmPYCGi2GGtY w4TXi2hvTagQyeYS0JHELMaROdz13aSbklfYjLv40x2fgQH/lc0xlAckZNV9zbkjr2P8 BvaJ8R84FUt1quA1JIJFVnT7DmzRvJLZkdFzW2/dO7UvharX4T+3zASTlwkW4eG5lLZ8 6UeV2H1xVcHgcyEDDu6F0BryWj9IywNSFBuqCx6e9DGCl4XzK1TGKByXnK6rPtN1Pi3f Cany8XiMB9eCzT+kyhfszQ5ho/5tXA+QmoTm3/cp3hPvKgN4WfDmOF5G6vaXvR3bOOxO ZC2Q== X-Gm-Message-State: AOAM533eBNTORbLqwIk4N6WVZEIByTvXl1zJxDh36b6URmHNwYpwJvcP IM5h7GKtW7f57dlhQXdvMFDAfhNAd+k= X-Google-Smtp-Source: ABdhPJxiVJLWQUXp4MeliHpnsiawZ6Z35rISIPLhNIjlHQtOkuVaDG2XUCIrTZTHvgxCebPHMPNEQg== X-Received: by 2002:a7b:cd96:: with SMTP id y22mr602764wmj.126.1603906728703; Wed, 28 Oct 2020 10:38:48 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id u5sm365004wru.63.2020.10.28.10.38.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2020 10:38:48 -0700 (PDT) To: internals@lists.php.net References: <893315378549048c16f2dc212bdec698fe32f8d10d37f9c5f74ffd179a1e0de9@mahalux.com> <73716a39-53ac-c9b4-a38a-86922a2edeb2@gmail.com> <275e0bd6800960e9f73f240cb95a6c5ae5059f3212285bf75a473260c0bce35f@mahalux.com> <021b343a079ad8e8b769a218cf9bfdab761a653c5a3abe4bd4b32ee6dee779ee@mahalux.com> Message-ID: <0239cf18-475f-defe-ee12-3c3d05ea491c@gmail.com> Date: Wed, 28 Oct 2020 17:38:46 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <021b343a079ad8e8b769a218cf9bfdab761a653c5a3abe4bd4b32ee6dee779ee@mahalux.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] Bug #80248 - Swapping parameter names during inheritance does not throw From: rowan.collins@gmail.com (Rowan Tommins) On 28/10/2020 17:06, Michael Voříšek - ČVUT FEL wrote: > For better names, I propose to allow rename "to never used name", thus > position is never changed and everything behave consistently across > named/unnamed params. I also propose to accept the old names, as > currently, if not used with the new names, the parameter names are not > resolved, so OOP/LSP is violated. This is precisely the behaviour discussed as an alternative in the RFC: https://wiki.php.net/rfc/named_params#to_parameter_name_changes_during_inheritance The reasons it was not implemented are given at the end of that section. >> Significant additional code in the engine to perform additional >> checks and/or name aliasing > > I know, but we can do very easily one thing - check and throw if > overriding method has one or more named parameter on different position. How confident are you that we can "very easily" do this? Have you looked into how it would need to be implemented, and what edge cases we would need to consider? At risk of sounding like a broken record: Nikita did look into it, and documented his conclusions in the RFC. Regards, -- Rowan Tommins (né Collins) [IMSoP]