Re: [PHP-DEV] Should there be a `get_declared_enums()` function ?

2024-08-17 Thread Mike Schinkel
> On Aug 17, 2024, at 1:36 AM, Juliette Reinders Folmer > wrote: >> What if instead PHP were to implement an optional 2nd callback parameter to >> `include()` / `require()` / `include_once()` / `require_once()` to allow us >> to capture the symbols loaded and their paths? The callback function

Re: [PHP-DEV] function autoloading v4 RFC

2024-08-17 Thread Rob Landers
On Sun, Aug 18, 2024, at 00:40, Rowan Tommins [IMSoP] wrote: > > > On 17 August 2024 22:33:03 BST, Rob Landers wrote: > >I wouldn't consider it a BC break, no. But (ironically?), Symfony crashes > >with this change. It really shouldn't but ... > > I don't think it makes sense to say "it breaks

Re: [PHP-DEV] function autoloading v4 RFC

2024-08-17 Thread Rowan Tommins [IMSoP]
On 17 August 2024 22:33:03 BST, Rob Landers wrote: >I wouldn't consider it a BC break, no. But (ironically?), Symfony crashes with >this change. It really shouldn't but ... I don't think it makes sense to say "it breaks existing code, but it's not a compatibility break". Perhaps what you're

Re: [PHP-DEV] Re: Decoding HTML and the Ambiguous Ampersand

2024-08-17 Thread Gina P. Banyard
On Friday, 16 August 2024 at 02:59, Dennis Snell wrote: > [...] > > I have submitted an RFC draft for including the proposed feature from this > issue. Thanks to everyone who helped me in this process. It’s my first RFC, > so I apologize in advance for any mistakes I’ve made in the process. >

Re: [PHP-DEV] String enums & __toString()

2024-08-17 Thread Bilge
On 17/08/2024 21:27, John Coggeshall wrote: would anyone have a strong objection to getting an RFC going to get this voted on? I don't think this is the right question to ask. Just write the RFC if you want to. If anyone objects, they will do so on the ML and at vote time, but it would be wro

Re: [PHP-DEV] String enums & __toString()

2024-08-17 Thread Gina P. Banyard
On Saturday, 17 August 2024 at 22:27, John Coggeshall wrote: > As it seems to me there isn't a particularly strong argument for why we don't > allow __toString() , would anyone have a strong objection to getting an RFC > going to get this voted on? I didn't look closely at the original PR from

Re: [PHP-DEV] String enums & __toString()

2024-08-17 Thread Rowan Tommins [IMSoP]
On 17 August 2024 21:27:59 BST, John Coggeshall wrote: > >I don't think it's without purpose... what it should be for is to allow >developers to make flexible APIs where they can type-hint string|Stringable >and the user of the API doesn't have to worry about it. My view is that the user *sh

Re: [PHP-DEV] function autoloading v4 RFC

2024-08-17 Thread Rob Landers
On Fri, Aug 16, 2024, at 02:22, Stephen Reay wrote: > > Sent from my iPhone > > > On 16 Aug 2024, at 04:45, Rob Landers wrote: > > > > Userland functions don't throw that error, so it shouldn't be an issue. > > (You can pass as many arguments as you want to a userland function, as long > > as

Re: [PHP-DEV] Decoding HTML and the Ambiguous Ampersand

2024-08-17 Thread Dennis Snell
On Aug 17, 2024, at 11:20 AM, Mel Dafert wrote: > > On August 16, 2024 2:59:11 AM GMT+02:00, Dennis Snell > mailto:dennis.sn...@automattic.com>> wrote: >> >> All, >> >> >> I have submitted an RFC draft for including the proposed feature from this >> issue. Thanks to everyone who helped me in

Re: [PHP-DEV] String enums & __toString()

2024-08-17 Thread John Coggeshall
> Just to show the range of viewpoints on this, I'd like to mention my opinion > that Stringable is a horrible feature, with an implementation that's > completely inconsistent with the rest of the language, and no clear semantic > purpose. If your contract is "the input must be usable as a stri

Re: [PHP-DEV] Re: Decoding HTML and the Ambiguous Ampersand

2024-08-17 Thread Mel Dafert
On August 16, 2024 2:59:11 AM GMT+02:00, Dennis Snell wrote: > >All, > > >I have submitted an RFC draft for including the proposed feature from this >issue. Thanks to everyone who helped me in this process. It’s my first RFC, so >I apologize in advance for any mistakes I’ve made in the process.

Re: [PHP-DEV] Should there be a `get_declared_enums()` function ?

2024-08-17 Thread Claude Pache
> Le 17 août 2024 à 15:17, Larry Garfield a écrit : > > On Fri, Aug 16, 2024, at 7:53 PM, Juliette Reinders Folmer wrote: >> On 16-8-2024 17:01, Ayesh Karunaratne wrote: >>> I went ahead and created PR https://github.com/php/php-src/pull/15443 along >>> with tests, UPGRADE notice, etc. I thin

Re: [PHP-DEV] Should there be a `get_declared_enums()` function ?

2024-08-17 Thread Larry Garfield
On Fri, Aug 16, 2024, at 7:53 PM, Juliette Reinders Folmer wrote: > On 16-8-2024 17:01, Ayesh Karunaratne wrote: >> I went ahead and created PR https://github.com/php/php-src/pull/15443 along >> with tests, UPGRADE notice, etc. I think having a `get_declared_enums` >> function will be helpful. Th

Re: [PHP-DEV] String enums & __toString()

2024-08-17 Thread Rowan Tommins [IMSoP]
On 17 August 2024 01:47:20 BST, John Coggeshall wrote: > What's the point of a Stringable interface if we can't actually implement > __toString() for it? Just to show the range of viewpoints on this, I'd like to mention my opinion that Stringable is a horrible feature, with an implementatio