Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111923 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81457 invoked from network); 22 Sep 2020 17:40:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Sep 2020 17:40:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DDD26180547 for ; Tue, 22 Sep 2020 09:50:43 -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,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10olkn2049.outbound.protection.outlook.com [40.92.40.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 22 Sep 2020 09:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gLryZ31bQU7tc/m+Wx6fLry4mA/kBtSSiwErp8f5zz7hn0qIvaBb3DP3MU0ffUDrsStK62X7pz6XkzoCe9P7cxgu+RxnCUEUlhjHL+VX7gJpOCmAM2TYF9xrFuQXT5gVRj3CnN0D78NulzUaGB/RYoLDCy9c+ApZJsXvIOee3I0zH0ZD+dbHfy4DDALttEjjIGa+lKwVIf8mQWVkutysxDis+i1cotuC7CZClkYt1Lb/kXs5Vsb1AGZdXUTJ4Z2S8qR3T/WeGIO6GCqVJn+snF1lBUZRISKL4M7zFReyAyvG/o21n7qXQ/DxJZXQBrTq7IlUmLuYGbCPTO50w9PHBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ctXfRI8OBrjCG2fZLgLspqu0Fd3A/CY9VrXIW/z75QI=; b=hVTmVTkd4f3zfmWTnESMkH1nJ1Fbp4gsPV3pFB9Rx77vVJ6aS7OIB4BgKiy198oJPIIPu0zvCUjSggTf3Wh4HJkMpKzUeZkrhiXstn1jmH1t3oAUqQm5oPViAQUwUTO6QZT29LSItjEZbg3G8+LVZOScExYtHtsAxA6qfWyM9kxxlyOyiNr4htibDaRSB+sjMY38Y4dVPyLsh9xA2r2CEvnWzjQgB4TOsgtjU6XQDnfwkGmJJviue/9MKazSsAvCnHxDDNKDAW012obdVOasoP4umfqWuO8EYeu+7/OByRdFS30T48tLJPt4BeXGnYPZHUpjHv9+rHsqhnndodzUQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ctXfRI8OBrjCG2fZLgLspqu0Fd3A/CY9VrXIW/z75QI=; b=LSuo8MS2PVp8tAWwha65x63gBLMxTSe4EL5796ZAgpWF+klnhR8cfSQuBVHLz0P8k6BhX4fzARmoTqigS3Hvvsnz+2BUSccziV8E3lHmtozGF4l9wqS2lrzqvMqV4kFYE3O4byzMKoE/LUNGkhec6kBHk7qYSPVskkS6P7d9MreBH2+sDv5ALN4Barue2Pz85VJ1qDRTkbkdJ6N8Ry1fE66tRrSpiIqg8PtBpFs05SlF/YRfTZDPJrnAY4MwlXs6TGUUD/5mbRI9W+Z0Usnr+ykuDKKlDcpfzR3ZsWEHXXFdwDBYivI3x0WUvxfD63xjknW2xBixNzoYp1Ya4+CsFQ== Received: from BN7NAM10FT050.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::50) by BN7NAM10HT113.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Tue, 22 Sep 2020 16:50:41 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:7e8f::43) by BN7NAM10FT050.mail.protection.outlook.com (2a01:111:e400:7e8f::284) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Tue, 22 Sep 2020 16:50:41 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::f9d1:ed5b:8625:bfb4]) by DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::f9d1:ed5b:8625:bfb4%7]) with mapi id 15.20.3391.026; Tue, 22 Sep 2020 16:50:41 +0000 To: Nikita Popov , PHP internals Thread-Topic: [PHP-DEV] Attributes on property groups Thread-Index: AQHWkN8nY9VjCncRdEG432iDrDPWRql03mmv Date: Tue, 22 Sep 2020 16:50:40 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:9FB42124F1F54B9EC776A1FE520D637DA59315FF4E6B9B3AAC21C16639577C79;UpperCasedChecksum:0D703EEE16D7A7B1C635FD55BEE916D55FD368DE00B3B5E4F7ED4BD0C6AC38CF;SizeAsReceived:6900;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [QDwTls0bkleOHBCPyen1MYIEhrBdREJ/] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 92c5cb7b-d04e-4880-c63e-08d85f17a3d7 x-ms-traffictypediagnostic: BN7NAM10HT113: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4mc3jRra18Kcd8lmnMvVNKOkz2hqdk8Cjq8QtaFBq6T/m/g3lI898G32xHH04e76fosG4ZeRin2FhIKcpHPzM1iisVrnOHpRvlm7lAuM0A7VjBDZgEpEF1TLiYCF3aHsAXqMu5BHgeVwARvyaoeN+V00dSHja+RWEW6BmJ1leI61xT7ZrX+oVnXIK49bQbVGfgfMPfnZ+yh8neYaovEf20prw/DCdiMQlPLTmfvHzQyOpHpwfKpUDNPdXv6SXm7V x-ms-exchange-antispam-messagedata: cZaaZClWfYYP/BGJB2g+dau30nC73DOfu6g78/FcRKmqd155hMd8v9MijsRExlmwdSk30+JmuTSnEvEcGGUiLj1Vw2OOOXGJbi5KaRzapOa1i4aBeZwxBOM7kIg814xxPhRcZdAvjNvNmXkD1jQ9Hg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: BN7NAM10FT050.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 92c5cb7b-d04e-4880-c63e-08d85f17a3d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 16:50:40.9579 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT113 Subject: Re: [PHP-DEV] Attributes on property groups From: tysonandre775@hotmail.com (tyson andre) Hi Nikita,=0A= =0A= > Hi internals,=0A= > =0A= > Currently, placing an attribute on property (or constant) groups is not= =0A= > allowed:=0A= > =0A= > class Foo {=0A= > =A0=A0=A0 #[NonNegative]=0A= > =A0=A0=A0 public int $x, $y, $z;=0A= > }=0A= > // Fatal error: Cannot apply attributes to a group of properties=0A= > =0A= > This is a case that was not explicitly mentioned in the RFC and we decide= d=0A= > to be conversative when landing the initial implementation.=0A= > =0A= > However, this restriction seems pretty arbitrary to me, and I think we=0A= > should remove it. While there is some potential ambiguity as to whether t= he=0A= > attribute applies to all properties or only the first one, I think the=0A= > general expectation is that it should apply to all properties, just like= =0A= > the property type does.=0A= > =0A= > PR to allow this: https://github.com/php/php-src/pull/6186=0A= > =0A= > Any thoughts on this?=0A= =0A= That seems like a good idea and doesn't seem like an ABI change. I'm surpri= sed this was a special case in the original implementation.=0A= I wouldn't consider it a BC break if code that was previously a CompileErro= r no longer threw a CompileError.=0A= =0A= The attribute node occurs before property modifiers such as `private static= `, which already pretty clearly apply=0A= to all elements in an attribute group, not just the first element.=0A= =0A= Regards,=0A= - Tyson=