Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111914 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 48558 invoked from network); 22 Sep 2020 13:41:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Sep 2020 13:41:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 25F661804B8 for ; Tue, 22 Sep 2020 05:51:42 -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-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 ; Tue, 22 Sep 2020 05:51:41 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id z19so17913472lfr.4 for ; Tue, 22 Sep 2020 05:51:41 -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=RC9z6n4spo+e9CVGQ+cRqU/hD3bqrONzDrM4/5QLgXM=; b=LoqsI830pft9xMLk3E2gLY7hacvxKEuLUE58uITcDuD05ge9CPiBN5ovr0ok0LtW2w /2hN7Exp4e99lvP2NuKQCeqPnJpUQdAVhRTJrbw/KN4W1BBJNMsbzcc16+J/ueiRvuj/ ra/w/qFosWB98HI7eeW1u6ObrKlmQ8JMs4D8S/6lwCxUtTY+QOaTIfC7xZe8ut5EX9IL yD/ZZMR7lWn3HYcuzXcYw4nhJSxcLsIxmBfKmKdrGxcqeypRKT3xYgVa5hVxXY63mVy3 H2AGQITpqbUZQPBwtSsT01xa9Xx+CefmogpxnCBqrPBFuobCXu9v8cyDfVwamhqqV0fI xrWg== 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=RC9z6n4spo+e9CVGQ+cRqU/hD3bqrONzDrM4/5QLgXM=; b=qJdFuB8NrjuefMaICLaSdyikQQ3Hd6VSKdSGnejCM/+Xbf7G7cV8g2/jjKuAvD4uCx Q1ZMteqGlZz7b/qmR6uCdMPrEJWUrSqcA4fHQv2cZHty992f04te/mFvgGrdIct3g70b BImr07uJZB9HHW/jwL2C8UEePYcyag7AhlkTz5sxfonbPzqqjmy8+YNd6GDHFPw0fTRT fL+wB21+eFgZYNjcsrDIlhMMWoTk4e2uYHxqSYcMvU8PwYlAD2De9nv1QdIWXDn/er3v ze+ua4dKRkHtZSRqZ4kQWjlOaKPR6r9mHaHaUypqU2pl5xytp2ST+MyEK8tCvPdQkENy 6yMg== X-Gm-Message-State: AOAM530+folLirCL8G//C7rCFmlPB10Nn1sZT3nFgg5zF7zGcxJ0F6uO YXOo3LjIRdtofx4XiFCgcqk0KkoF8ixeq1ZRVha0PhtBXSg4d4jU X-Google-Smtp-Source: ABdhPJxi1ey96m4RrdehQHk2pBjoD6pEh6JQVMMAQzgN5Fpe4RYyr5owwt6P5tBW0/HSfSsJyJSxu0mQ4Q7tV6WdT7U= X-Received: by 2002:a05:6512:34d1:: with SMTP id w17mr1513175lfr.30.1600779098301; Tue, 22 Sep 2020 05:51:38 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 22 Sep 2020 14:51:22 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000084a9b505afe66da0" Subject: Attributes on property groups From: nikita.ppv@gmail.com (Nikita Popov) --00000000000084a9b505afe66da0 Content-Type: text/plain; charset="UTF-8" Hi internals, Currently, placing an attribute on property (or constant) groups is not allowed: class Foo { #[NonNegative] public int $x, $y, $z; } // Fatal error: Cannot apply attributes to a group of properties This is a case that was not explicitly mentioned in the RFC and we decided to be conversative when landing the initial implementation. However, this restriction seems pretty arbitrary to me, and I think we should remove it. While there is some potential ambiguity as to whether the attribute applies to all properties or only the first one, I think the general expectation is that it should apply to all properties, just like the property type does. PR to allow this: https://github.com/php/php-src/pull/6186 Any thoughts on this? Regards, Nikita --00000000000084a9b505afe66da0--