Re: [PHP-DEV] Attributes on property groups

2020-09-25 Thread Sara Golemon
On Tue, Sep 22, 2020 at 7:51 AM Nikita Popov 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

Re: [PHP-DEV] Attributes on property groups

2020-09-22 Thread tyson andre
Hi Nikita, > 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

Re: [PHP-DEV] Attributes on property groups

2020-09-22 Thread Larry Garfield
On Tue, Sep 22, 2020, at 7:51 AM, 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 >

Re: [PHP-DEV] Attributes on property groups

2020-09-22 Thread Benas IML
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

Re: [PHP-DEV] Attributes on property groups

2020-09-22 Thread Marco Pivetta
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,

[PHP-DEV] Attributes on property groups

2020-09-22 Thread Nikita Popov
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