Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111918 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58726 invoked from network); 22 Sep 2020 14:13:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Sep 2020 14:13:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B30BF1804B8 for ; Tue, 22 Sep 2020 06:23:28 -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-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 06:23:28 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id u8so18022399lff.1 for ; Tue, 22 Sep 2020 06:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ayy40bnxcny89Z+yPfiMgM9L5ZjU3IWaQQGGXiOFBYo=; b=TIWJAyvq3PirifnyPQiYsdvAjlY9c+oY0ROmw7+RVh95iNqg9hE5aNLVZeVKPGyrHU /EBrF+5shNlEEK+sOrndfiptXDUlz7sk0hjf4gC1UL6rfncRZdOOjgaRH5V9ZYLbK8wc KugHbibtmjti7VYKhDMk0dsF1TsbGfBfzWcLxJ4MmbT2FaLEJXUqkMAA9tC80lpqs4gK EOMKrVaGcR7fUICE8XMbIHBy6Fh7AluMp8+prImDn0g3/jtPTZPhAE28d79Hpx9WNNEH +ZDIPmaWo4Y88UWheueBXRuKNsKe3XsnRlDnS7yHqOCRZbvJSt9kOZj2mpUMndXyM4sR Forg== 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=ayy40bnxcny89Z+yPfiMgM9L5ZjU3IWaQQGGXiOFBYo=; b=W6gDBHQ7/sswwAjoA2k1IbUjlH9g0AijLzWSaWG7wtZnseTRBU+DNoVW4riKxSdnbT 2UgmtMe3+ekeVctwPt7DygwDRbc2q1aOdXHBFnK3U1nFztsUvrt+JlS9lOpfS8yRjDWg zP4E4N0qESst26lu3rmcFVTmGFF5Az7+nmE6mWAIYzNYdeTN9oWfZIt+dYGlzLrC2jeC UHv3fL/Km9b6tP87W7PNaikvx4H0C+5cjEadgs2IzbXkJQa1P6pKuScCLAD+vKCNgbwN j6ARbBKmzLSWuI3YeJLetn2VZybaZfTiAaTFc+TY3VhqbK46dDHsFVqFVVxEA6FABRHY ep1g== X-Gm-Message-State: AOAM530Sf5E6MMjE8+8PmWJXrfC7CVJ5x+jLq30Sigl81L4BGCtDYbRQ kQK+4urodcujFS7IGMSPfMn0KnpJuetr41841VY= X-Google-Smtp-Source: ABdhPJzp7kKu++YRatUIS21UB7vz7vvg2ZQ+sgpDN75bVGKU+jOCkOswh9tS7Qck/H21gMWTM/EkPMcFWuzHJ/06d78= X-Received: by 2002:a19:992:: with SMTP id 140mr1578067lfj.273.1600781006244; Tue, 22 Sep 2020 06:23:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 22 Sep 2020 16:23:14 +0300 Message-ID: To: Marco Pivetta Cc: Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary="0000000000003d8dfc05afe6df15" Subject: Re: [PHP-DEV] Attributes on property groups From: benas.molis.iml@gmail.com (Benas IML) --0000000000003d8dfc05afe6df15 Content-Type: text/plain; charset="UTF-8" And why would we want to do that? On Tue, Sep 22, 2020, 4:04 PM Marco Pivetta wrote: > Probably easier/simpler to deprecate (then remove) property declaration > groups, no? > > On Tue, Sep 22, 2020, 14:51 Nikita Popov wrote: > > > 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 > > > --0000000000003d8dfc05afe6df15--