Re: [PHP-DEV] [RFC] Change Directory class to behave like an opaque object

2024-10-02 Thread Gina P. Banyard
On Wednesday, 2 October 2024 at 00:32, Larry Garfield wrote: > > I have no strong opinions on this RFC as I've not paid close attention to it, > but "we can't introduce an unnamespaced class, that's a BC break" is simply > not true, and not consistent with how Internals and the stdlib are and

Re: [PHP-DEV] [RFC] Change Directory class to behave like an opaque object

2024-10-02 Thread Christoph M. Becker
On 02.10.2024 at 12:55, Gina P. Banyard wrote: > On Wednesday, 2 October 2024 at 00:32, Larry Garfield > wrote: > >> I have no strong opinions on this RFC as I've not paid close attention to >> it, but "we can't introduce an unnamespaced class, that's a BC break" is >> simply not true, and not

Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function

2024-10-02 Thread Alexandru Pătrănescu
On Wed, Oct 2, 2024 at 1:48 AM Juliette Reinders Folmer < php-internals_nos...@adviesenzo.nl> wrote: > L.S., > > After the earlier discussion [1] regarding this topic in August, it is our > pleasure to present the RFC to add a `get_declared_enums()` function to PHP > for discussion. > > https://wi

Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function

2024-10-02 Thread Rob Landers
On Wed, Oct 2, 2024, at 09:20, Alexandru Pătrănescu wrote: > > On Wed, Oct 2, 2024 at 1:48 AM Juliette Reinders Folmer > wrote: >> L.S., >> >> After the earlier discussion [1] regarding this topic in August, it is our >> pleasure to present the RFC to add a `get_declared_enums()` function to P

Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function

2024-10-02 Thread Alexandru Pătrănescu
On Wed, Oct 2, 2024 at 10:20 AM Alexandru Pătrănescu wrote: > > One would be able to get only the enums by using something like: > ```php > function get_declared_enums_only() { > return array_diff(get_declared_classes(), get_declared_enums()); > } > ``` > > Sorry, I somehow got confused, and

Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function

2024-10-02 Thread Derick Rethans
On 2 October 2024 09:06:20 BST, Rob Landers wrote: >You cannot build a “class” with these rules in PHP, so I don’t think enums >quack sufficiently like classes to be called a class. I would argue that it is >an object, however. I think it would be worth implementing a >get_declared_objects() t

Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function

2024-10-02 Thread Alexandru Pătrănescu
On Wed, Oct 2, 2024 at 11:06 AM Rob Landers wrote: > On Wed, Oct 2, 2024, at 09:20, Alexandru Pătrănescu wrote: > > > On Wed, Oct 2, 2024 at 1:48 AM Juliette Reinders Folmer < > php-internals_nos...@adviesenzo.nl> wrote: > > L.S., > > After the earlier discussion [1] regarding this topic in Augus

Re: [PHP-DEV] [RFC] Policy on 3rd party code

2024-10-02 Thread Andreas Heigl
Hey all On 02.10.24 21:17, Deleu wrote: On Wed, Oct 2, 2024 at 3:38 PM Larry Garfield > wrote: Since Jim's RFC proposal was criticized for being too vague, I hereby offer a somewhat more prescriptive policy proposal on using 3rd party code.  (With J

Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function

2024-10-02 Thread Rob Landers
On Wed, Oct 2, 2024, at 14:27, Alexandru Pătrănescu wrote: > > On Wed, Oct 2, 2024 at 11:06 AM Rob Landers wrote: >> __ >> On Wed, Oct 2, 2024, at 09:20, Alexandru Pătrănescu wrote: >>> >>> On Wed, Oct 2, 2024 at 1:48 AM Juliette Reinders Folmer >>> wrote: L.S., After the earli

Re: [PHP-DEV] [RFC] Policy on 3rd party code

2024-10-02 Thread Jim Winstead
On Wed, Oct 2, 2024, at 12:17 PM, Deleu wrote: > On Wed, Oct 2, 2024 at 3:38 PM Larry Garfield wrote: >> Since Jim's RFC proposal was criticized for being too vague, I hereby offer >> a somewhat more prescriptive policy proposal on using 3rd party code. (With >> JIm's blessing.) It's still mor

Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function

2024-10-02 Thread Larry Garfield
On Wed, Oct 2, 2024, at 7:27 AM, Alexandru Pătrănescu wrote: > I think my view comes from when I initially dug (15+ years ago) into > what an enum in Java is, and learned that it is just a syntactic sugar, > and a final class would be generated implementing `Comparable` and > extending an abstr

[PHP-DEV] [RFC] Policy on 3rd party code

2024-10-02 Thread Larry Garfield
Since Jim's RFC proposal was criticized for being too vague, I hereby offer a somewhat more prescriptive policy proposal on using 3rd party code. (With JIm's blessing.) It's still more heuristics than rules, but I think that's the right approach generally. It also includes a voting mechanism

Re: [PHP-DEV] [RFC] [Discussion] Add get_declared_enums() function

2024-10-02 Thread Alexandru Pătrănescu
On Wed, Oct 2, 2024, 21:32 Larry Garfield wrote: > On Wed, Oct 2, 2024, at 7:27 AM, Alexandru Pătrănescu wrote: > > > If we remove the limitations, should we reclassify at that point enums > > as classes? > > Enums already are classes. I don't know what reclassification you're > talking about.

Re: [PHP-DEV] [RFC] Policy on 3rd party code

2024-10-02 Thread Deleu
On Wed, Oct 2, 2024 at 3:38 PM Larry Garfield wrote: > Since Jim's RFC proposal was criticized for being too vague, I hereby > offer a somewhat more prescriptive policy proposal on using 3rd party > code. (With JIm's blessing.) It's still more heuristics than rules, but I > think that's the rig