Re: [PHP-DEV] Attributes and constructor property promotion

2020-10-06 Thread Benjamin Eberlei
On Tue, Oct 6, 2020 at 6:21 PM Andreas Leathley wrote: > On 06.10.20 17:15, Sara Golemon wrote: > > My opinion on constructor property promotion (CPP) is that it's something > > for small value object classes and should probably be regarded as > > code-smell on larger classes. At the same time,

Re: [PHP-DEV] Attributes and constructor property promotion

2020-10-06 Thread Rowan Tommins
On Tue, 6 Oct 2020 at 17:20, Andreas Leathley wrote: > From my understanding suppressing the validation errors in this > particular case would be a good solution, or are there any serious > downsides to that? > The downside presumably is that a library author could implement an attribute with

Re: [PHP-DEV] Attributes and constructor property promotion

2020-10-06 Thread Andreas Leathley
On 06.10.20 17:15, Sara Golemon wrote: My opinion on constructor property promotion (CPP) is that it's something for small value object classes and should probably be regarded as code-smell on larger classes. At the same time, annotations belong with more complex objects and not so much with

Re: [PHP-DEV] Attributes and constructor property promotion

2020-10-06 Thread Sara Golemon
On Mon, Sep 28, 2020 at 5:36 AM Nikita Popov wrote: > When the constructor property promotion landed, the question of how it > interacts with attributes on promoted properties did not get fully > resolved. See https://wiki.php.net/rfc/constructor_promotion#attributes > for > what the issue is. >

[PHP-DEV] Re: Attributes and constructor property promotion

2020-10-06 Thread Nikita Popov
On Mon, Sep 28, 2020 at 12:36 PM Nikita Popov wrote: > Hi internals, > > When the constructor property promotion landed, the question of how it > interacts with attributes on promoted properties did not get fully > resolved. See https://wiki.php.net/rfc/constructor_promotion#attributes > for

[PHP-DEV] Stream filter may loose final block of data

2020-10-06 Thread Christoph M. Becker
Hi all, as outlined in bug #77069[1], a stream filter may loose (aka. skip) the final data block. That bug report has some duplicates: #48725, #79984 and #77080. Several weaks ago I made PR #6001[2] which would fix this issue, but I'm not sure whether that change would violate the assumption

Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-06 Thread G. P. B.
On Tue, 6 Oct 2020 at 12:20, Brent Roose wrote: > The point of short closures, regardless of single line or multi line, is > addressed (and agreed upon by the RFC votes) in the first pararaph of the > RFC [1]. I'm not sure if I can add anything useful rather than saying "it's > nice to be able

Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-06 Thread G. P. B.
On Tue, 6 Oct 2020 at 11:28, G. P. B. wrote: > First, can you please bottom-post and not top-post. > > On Tue, 6 Oct 2020 at 09:53, Brent Roose wrote: > >> Hi internals >> >> The reason multi-line short closures are so valued by userland devs is >> because they are shorter to write and prettier

Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-06 Thread G. P. B.
First, can you please bottom-post and not top-post. On Tue, 6 Oct 2020 at 09:53, Brent Roose wrote: > Hi internals > > The reason multi-line short closures are so valued by userland devs is > because they are shorter to write and prettier to read. While some of us > might not agree on the

Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-06 Thread Brent Roose
Hi internals The reason multi-line short closures are so valued by userland devs is because they are shorter to write and prettier to read. While some of us might not agree on the definition of "prettier to read", it was one of the key arguments for adding short closures in the first place: >