Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111916 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51995 invoked from network); 22 Sep 2020 13:54:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Sep 2020 13:54:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B0CC51804E3 for ; Tue, 22 Sep 2020 06:04:37 -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-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (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:04:37 -0700 (PDT) Received: by mail-io1-f43.google.com with SMTP id z13so19429243iom.8 for ; Tue, 22 Sep 2020 06:04:37 -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=UXB07caPf043xM4oUlMeHB0wHgXlLXyRqmebZWL5XyU=; b=gfpzPxSDp9sADqk5rF4zIqJe40cSAiPvMD619ECOYCNQzsESjRyZ2v8bI5tjigwtGQ hliejFRijJPCrDc5/uqJ+e9nNO8MfcD44Mflz7KHQsbaXRFWEzBWr9OB7EHG0hsyD5F3 F+LxE9MjKfFv5yw+A5e5YNwO6RFsJhbP6aYNovjTkMGgPMLgbisvK48nImbGv7uXRsnf 6Pckzz1QPRWbSlnByAqysggtyOmeIeKwHv8SA16MtyyUAJm65goAwUIw4VUUA6WAW65r q/orJcYPN30Ri3wTUpdhURPCGV/nP/wFhH4XhMOvEcxoZ9IDM6UpExYliTD2fThXFZCo xl8g== 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=UXB07caPf043xM4oUlMeHB0wHgXlLXyRqmebZWL5XyU=; b=j+22ytQMt73EE+crjngraN1EiVkKQ2h9ljIyb1Yc5w/XQKEsoGecGMmXJvu8xUj7gw i8SjfDCaYpGlKlbUcMv2Ti+FrRBmeTkaG825l3CJniOTDiCzB0HckQfpuiBWFegEmAke 4UEso0U1eFP5rEI76g/rdKVsCnGD+ZOrZOxBK09d87fZRhN7eyzZZXfYrRoiyD67Wi7V iWQoxSdgSS6HcOSqRUqh52cUFUNqMjiTnxaV9o0izDwAvL4g93uwoypr9st0fjE2p3Vg vXjritf3BnreVe6+kg3dY6uNBMESI5CtFGTqM+x3JO1EqJHBEhMTYlElmuzn5/YpZMEq 1Kkg== X-Gm-Message-State: AOAM532GnGxfGWg3+qcVGAXXHCrJKk2mHi/JEtm1Zgr+HwbymTGzcpmv lYFaPEX+KQE7EjWvr2FujSXTvYzM3mltRYLoc8E= X-Google-Smtp-Source: ABdhPJxur7oUsOt9yUC1A/pYnDokwbGe+4p1ovx8uIKaQB0snzN8yy6J5SuIlfybSWMDc0knq6AS5cXD2X9jKruKi0g= X-Received: by 2002:a6b:e40f:: with SMTP id u15mr3323752iog.132.1600779876528; Tue, 22 Sep 2020 06:04:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 22 Sep 2020 15:04:24 +0200 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000e776be05afe69bfe" Subject: Re: [PHP-DEV] Attributes on property groups From: ocramius@gmail.com (Marco Pivetta) --000000000000e776be05afe69bfe Content-Type: text/plain; charset="UTF-8" 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 > --000000000000e776be05afe69bfe--