Re: Attributes on property groups

From: Date: Fri, 25 Sep 2020 15:22:40 +0000
Subject: Re: Attributes on property groups
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-111934@lists.php.net to get a copy of this message
On Tue, Sep 22, 2020 at 7:51 AM Nikita Popov <nikita.ppv@gmail.com> wrote: > Currently, placing an attribute on property (or constant) groups is not > allowed: > > This is a case that was not explicitly mentioned in the RFC and we decided > to be conversative when landing the initial implementation. > > Conservative is a good default, but as Tyson pointed out, nobody is confused about visibility modifiers applying to the entire group, I don't believe they'd be confused about attribute application. ((Though I am curious what phpdoc syntax says here.)) > 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. > Agreed. The limitation seems arbitrary and unnecessary. Call this a refinement of the feature previously landed, and let's get it into 8.0. -Sara

« previous php.internals (#111934) next »