[PHP-DEV] [RFC] Never For Argument Types

2021-08-13 Thread Jordan LeDoux
Hey internals, I've been working on the draft for my operator overloading RFC, and in doing so I encountered a separate change that I would like to see. That is, the use of `never` as an argument type for interfaces. Since arguments in PHP are contravariant to preserve Liskov substitution,

Re: [PHP-DEV] Broken reference at https://wiki.php.net/rfc/howto

2021-08-13 Thread  Good Guy 
On 13/08/2021 23:43, Willian de Souza wrote: Hi all, Hope I'm in the right place, I was reading and I found a broken reference, the link to the explanation of the "bottom post"  in first step redirects to this page:

[PHP-DEV] Broken reference at https://wiki.php.net/rfc/howto

2021-08-13 Thread Willian de Souza
Hi all, Hope I'm in the right place, I was reading and I found a broken reference, the link to the explanation of the "bottom post" in first step redirects to this page:

Re: [PHP-DEV] Unwrap reference after foreach

2021-08-13 Thread Trevor Rowbotham
Original Message On Aug 13, 2021, 9:28 AM, Nikita Popov < nikita@gmail.com> wrote: Hi internals, I'd like to address a common footgun when using foreach by reference: https://wiki.php.net/rfc/foreach_unwrap_ref This addresses the issue described in the big red box at

Re: [PHP-DEV] Unwrap reference after foreach

2021-08-13 Thread Tobias Nyholm
I’m happy with this too. I’m +1 for most things that makes a smoother developer experience. //Tobias Nyholm > On 13 Aug 2021, at 06:44, Hans Henrik Bergan wrote: > > +1 from me, and yeah lets not care about that edge case, i hope the edge > gets removed at some point.. (but that's an issue

Re: [PHP-DEV] readonly properties

2021-08-13 Thread Marc
On 8/13/21 4:56 PM, Nikita Popov wrote: On Thu, Aug 12, 2021 at 9:16 PM Marc wrote: Hi, As 8.1 adds readonly properties I wonder which build-in properties should be defined readonly. Currently I could find build-in readonly properties only on PDO and DOM. Very incomplete list where

Re: [PHP-DEV] readonly properties

2021-08-13 Thread Nikita Popov
On Thu, Aug 12, 2021 at 9:16 PM Marc wrote: > Hi, > > As 8.1 adds readonly properties I wonder which build-in properties > should be defined readonly. > > Currently I could find build-in readonly properties only on PDO and DOM. > > > Very incomplete list where readonly properties could make

Re: [PHP-DEV] Unwrap reference after foreach

2021-08-13 Thread Flávio Heleno
On Fri, Aug 13, 2021 at 11:20 AM Claude Pache wrote: > > > Le 13 août 2021 à 15:28, Nikita Popov a écrit : > > > > Hi internals, > > > > I'd like to address a common footgun when using foreach by reference: > > https://wiki.php.net/rfc/foreach_unwrap_ref > > > > This addresses the issue

Re: [PHP-DEV] Unwrap reference after foreach

2021-08-13 Thread Claude Pache
> Le 13 août 2021 à 15:28, Nikita Popov a écrit : > > Hi internals, > > I'd like to address a common footgun when using foreach by reference: > https://wiki.php.net/rfc/foreach_unwrap_ref > > This addresses the issue described in the big red box at >

Re: [PHP-DEV] Unwrap reference after foreach

2021-08-13 Thread Hans Henrik Bergan
+1 from me, and yeah lets not care about that edge case, i hope the edge gets removed at some point.. (but that's an issue for another thread) FWIW if attempts at getting it in 8.2 fails, i would welcome another attempt at this for PHP9 On Fri, 13 Aug 2021 at 15:29, Nikita Popov wrote: > Hi

[PHP-DEV] Unwrap reference after foreach

2021-08-13 Thread Nikita Popov
Hi internals, I'd like to address a common footgun when using foreach by reference: https://wiki.php.net/rfc/foreach_unwrap_ref This addresses the issue described in the big red box at https://www.php.net/manual/en/control-structures.foreach.php. While this is "not a bug" (as our bug tracker can

Re: [PHP-DEV] [VOTE] Nullable intersection types

2021-08-13 Thread Marco Pivetta
Hey Nicolas, On Fri, Aug 13, 2021 at 11:35 AM Nicolas Grekas wrote: > Hi everyone, > > I'm happy to announce that the vote for nullable intersection types is now > open: > https://wiki.php.net/rfc/nullable_intersection_types > > It'll close in two weeks, on the 27th. > I voted NO on this one.

[PHP-DEV] [VOTE] Nullable intersection types

2021-08-13 Thread Nicolas Grekas
Hi everyone, I'm happy to announce that the vote for nullable intersection types is now open: https://wiki.php.net/rfc/nullable_intersection_types It'll close in two weeks, on the 27th. Cheers, Nicolas