Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109907 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38307 invoked from network); 29 Apr 2020 10:23:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Apr 2020 10:23:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AEA471804C2 for ; Wed, 29 Apr 2020 01:57:00 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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, 29 Apr 2020 01:56:59 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id z6so1122428wml.2 for ; Wed, 29 Apr 2020 01:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ncL1Sg71x3IZ7/hfw8djnSE0luVzzrCsvs7B0NCldmY=; b=G0uHXg6v6UWKLwjl1SDGAWiFVWzwLCkIBeVlhPBQTFV740RCkIZix0Na8HKz4SQVZk 4gc6HZVE5zR0Tv6Bw0/dAhKMDdHk2vlzO2KksE662P4i+xXFKJMhWksokHC48GqkgSXO yDQeMsxg+R0hHSD8uReC2+tITTbjvZK/rkcxhwEoFDiFZHf1z1z3CYR950v0zs6TDMmN FJHKOq48xVMZnE3QSgGc3NlV1VG8KbMcVhJWxCoro7wJEEqWtus/eFMYYjU5yCnWc2Zt XSjEqKnY9v/kQDGd8L/zl6JYLboq7/bbhHC+G0Ibfyj/zeDKCRsEvk0wZIIiAUhAnk2I +38A== 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:cc; bh=ncL1Sg71x3IZ7/hfw8djnSE0luVzzrCsvs7B0NCldmY=; b=n3oRIJTJbeDxNCjoPPxahtXXLE93fXHGWkjam9lRvBQ2Hd0yQ5Xi+9Jh0EAW3hpmlh HdZ78Y9aNW2BfDTc6bNp/NVpY8ROvDIGeAbsG6/m57eCq5/DsLNer5gxYwu9O2ZuxKS9 wQDrQ9RZZHXNjnKGkLDqs3HtxYDNXSqKAuzb77OxSTVx9ncy86Ic6mq4cTaD0ni3Ilsn W//YlKHO4iVYr447e8dLUUSICBDFYFCdv2A1nN+K9ue5P98JwBVon2WBNjrRIAGoaiDK +7hJniZv81Ccq/fotBC3mCILtBOyvtEk8tz8cTYYk6Fn+dP4D2ZaQ08+XGdemF2d8z/R asZw== X-Gm-Message-State: AGi0PuZ396zX7HzJE2d08TQRakrx9VWS69NxmZyo0eRfYairRWkn9mml 8vYaof15ve7AN3AlP5aMiUuJ/bHjfZN7VMtufmyxxA== X-Google-Smtp-Source: APiQypKsRGXYZSHR2Jp2QN6jCMQzqoun6EP87MuJqAIfgtHoxEuTSNuWCLxUb0XovgBvnQr7WV+vkSt5BX12E6InndE= X-Received: by 2002:a1c:bb08:: with SMTP id l8mr2243111wmf.168.1588150613286; Wed, 29 Apr 2020 01:56:53 -0700 (PDT) MIME-Version: 1.0 References: <76b72148-4b3a-4a63-ab4c-245439a94823@www.fastmail.com> In-Reply-To: Date: Wed, 29 Apr 2020 10:56:42 +0200 Message-ID: To: Nicolas Grekas Cc: Nikita Popov , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000027b25b05a46a21e3" Subject: Re: [PHP-DEV] Re: [RFC] Constructor Property Promotion From: kontakt@beberlei.de (Benjamin Eberlei) --00000000000027b25b05a46a21e3 Content-Type: text/plain; charset="UTF-8" On Wed, Apr 29, 2020 at 9:47 AM Nicolas Grekas wrote: > > I think it might be best to apply to "both" and provide an isPromoted() > > method on both ReflectionParameter and ReflectionProperty. Any code that > > wishes to validate the allowed positions of an attribute can then skip > > properties/parameters that report isPromoted() as true, to avoid > reporting > > false positives. > > > > That sounds good. Deal on my side. > Just to mention, any approach here potentially conflicts with anything we consider for potential target validation on attributes, i.e. declaring for an attribute that it is only allowed on a property OR an argument. At the point constructor promotion happens, we can also not look into the attribute to see if its target=property or target=parameter, because this would require triggering autoloader. > Nicolas > --00000000000027b25b05a46a21e3--