Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111942 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53877 invoked from network); 28 Sep 2020 11:25:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Sep 2020 11:25:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EA23518050B for ; Mon, 28 Sep 2020 03:36:53 -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,HTML_MESSAGE, 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-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 ; Mon, 28 Sep 2020 03:36:53 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id w3so595636ljo.5 for ; Mon, 28 Sep 2020 03:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=djK+QUTe6sWGCbnz8mfWJv3GhWcaYu6KGIGdI3gnqSY=; b=hj9bXd6ZkTvcz3nBwHA1vAb1CtZXAfGOYa0gE79zIrE9cmqUXSRbpCB20o2SIHmA3H yrF9bwBiQx+0zIOf4CI74CUv3hQQL5IG7PbOpR+SpTmXtCC1sXip1hVKoV4YuIvCut5S Mg29VjrPmMrdH+mp7ffJhIktE6HrCal0H5yKNlqXr7PVoMhY5EUSvfIIEofmA9McsUTN RVn+ilgDggqv6QXS6cjW0fdHWJTMdhFbMmO8DXFMdLGpGNZsLLnxi/jv/V/tR/kngLQh Y/GpjtRznF90eRc7aqFOw+7Xshqdm1rl19WMWAtPrRbWTzIQ2JTNmPewLfgl/2J7BHLP /a0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=djK+QUTe6sWGCbnz8mfWJv3GhWcaYu6KGIGdI3gnqSY=; b=g5QVZUq12npf5x7uCGKACJWuBxggXjoxzyEEFs3eHnEgUvXXOhEXmypDrRYPzdNZq3 KFRz0wyHd1JAX1HNZIQjUsGOxSKPTqNpx+ouFyp0mv+dXmQ+P66Up7q3MATYFg6+tTe9 WibJ/VZEIlozM3fgZ//WH9MFF6/Se7Sez0YdcSnHGOQEKEKitNu74B/bJbS7xefXfcRh VCP2iIW1K4/Upn/Fd5Pif2bcnEegWbswsKHWW9g+xHszkhWAdBivuq4QOUMs3KO+nlTq UqJroobaUBIFbRJUgs4p+4DMCKv28c7zuLG6ggJ6FuF2Ceu0S5ZJnY5XCN7FuGsFrWF1 oySw== X-Gm-Message-State: AOAM530B5UTNY261mxWg9vUG7Fq/HHXDdLEjpAL0Lmd2UdsjZLQOZFrV qnd3OwL2eBDwZiSy7toW6cJESc195W3sqX1qyQ9tPJG8lcJ9Uw== X-Google-Smtp-Source: ABdhPJxgPyw+O/Lhd6KtJ5tGRMjM0wlgpwJE2LUd3pYEQF3VZQJ3d+W+btplxYS5Lq9t2l7TaKbzN5vHpecfW6Ezrh8= X-Received: by 2002:a05:651c:290:: with SMTP id b16mr215165ljo.307.1601289409353; Mon, 28 Sep 2020 03:36:49 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 28 Sep 2020 12:36:33 +0200 Message-ID: To: PHP internals , Benjamin Eberlei Content-Type: multipart/alternative; boundary="0000000000006d5c9b05b05d3e82" Subject: Attributes and constructor property promotion From: nikita.ppv@gmail.com (Nikita Popov) --0000000000006d5c9b05b05d3e82 Content-Type: text/plain; charset="UTF-8" Hi internals, When the constructor property promotion landed, the question of how it interacts with attributes on promoted properties did not get fully resolved. See https://wiki.php.net/rfc/constructor_promotion#attributes for what the issue is. The behavior that landed was to apply the attribute is applied to both the parameter and the property. However, this was with the understanding that we may have to adjust the behavior later, in particular depending on how the whole "attribute target validation" turns out. The way it is now, using a property-only attribute on a promoted parameter may result in spurious validation errors. I wanted to bring up this topic now to make sure it's not forgotten... I still don't really know what the best behavior here is. Regards, Nikita --0000000000006d5c9b05b05d3e82--