Re: [PHP-DEV] The future of objects and operators

2022-05-07 Thread MKS Archive
> On May 6, 2022, at 6:16 PM, Jordan LeDoux wrote: > > Hello all, > > I took a while away after my operator overload RFC was declined. I've been > mulling for the last few months how to move forward while respecting the > concerns and feedback of those who abstained and those who voted

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Jordan LeDoux
On Sat, May 7, 2022 at 2:11 PM Jordan LeDoux wrote: > > I'm concerned from your replies in this thread and the content of the RFC > that you don't actually understand the extent of a BC-break you're > proposing. > > Sorry, that was a tad more combative than I intended. What I'm trying to say is

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Jordan LeDoux
On Sat, May 7, 2022 at 1:38 AM Craig Francis wrote: > > Not what I'm going for... but anyway, to get an idea of your position, do > you think the string '15' should be coerced to a number, or should it fatal > error as well? e.g. > > $my_number = round($request->get('my_number')); > > '15' is

Re: [PHP-DEV] The future of objects and operators

2022-05-07 Thread Jordan LeDoux
On Sat, May 7, 2022 at 11:40 AM Larry Garfield wrote: > > I would group object operators into 4 categories/levels. > > 1. Object-universal operators. This would be support for operators that > make sense in all domains. Mainly this is the comparison operators but > there may be others. > 2.

Re: [PHP-DEV] Possible improvements to the Reflection functionality

2022-05-07 Thread Ollie Read
Hey again! > Greetings. > > I've also been doing a lot of work with Reflection lately as part of > https://github.com/Crell/AttributeUtils . I agree with and support almost > all of these additions. (I'm no entirely convinced by > getNumberOfAttributes(), but I don't really see a harm in

Re: [PHP-DEV] The future of objects and operators

2022-05-07 Thread Larry Garfield
On Fri, May 6, 2022, at 5:16 PM, Jordan LeDoux wrote: > Hello all, > > I took a while away after my operator overload RFC was declined. I've been > mulling for the last few months how to move forward while respecting the > concerns and feedback of those who abstained and those who voted against. >

Re: [PHP-DEV] Possible improvements to the Reflection functionality

2022-05-07 Thread Larry Garfield
On Thu, May 5, 2022, at 12:04 PM, Ollie Read wrote: > Hello all, > > I've been spending a lot of time in the world of PHP reflection lately, > which has led me to create PRs for the documentation, a bug for closure > attributes, and even a new method on ReflectionMethod. I've also > compiled a

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Aleksander Machniak
On 07.05.2022 13:29, Mel Dafert wrote: It is exactly user-defined functions that this RFC introduces breakage for. The behaviour to throw on null in user-defined functions exists since PHP 7.0, and is being relied on. Changing these now would introduce behaviour changes that are harder to find

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Mel Dafert
On 7 May 2022 12:54:45 CEST, Craig Francis wrote: >I will note that my RFC does not change NULL coercion (why I quoted the >documentation), and I'm not against the other BC breaks where certain type >coercions are clearly problematic. > >It was 8.1 which introduced this specific BC problem

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Craig Francis
> On 7 May 2022, at 10:01, Marco Pivetta wrote: > > Hey Craig Hi Marco, Thanks for your thoughts. > On Sat, 7 May 2022, 10:39 Craig Francis, > wrote: > Not what I'm going for... but anyway, to get an idea of your position, do you > think the string '15'

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Marco Pivetta
Hey Craig On Sat, 7 May 2022, 10:39 Craig Francis, wrote: > Not what I'm going for... but anyway, to get an idea of your position, do > you think the string '15' should be coerced to a number, or should it fatal > error as well? e.g. > > $my_number = round($request->get('my_number')); >

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Craig Francis
On 7 May 2022, at 06:59, Aleksander Machniak wrote: > > On 08.04.2022 19:34, Craig Francis wrote: >> Hi, >> I've written a new draft RFC to address the NULL coercion problems: >> https://wiki.php.net/rfc/null_coercion_consistency > > As a voter, I'm in favor of this RFC. > > I suggest to

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Craig Francis
On 7 May 2022, at 04:45, Jordan LeDoux wrote: > > On Fri, Apr 8, 2022 at 10:35 AM Craig Francis > wrote: > https://wiki.php.net/rfc/null_coercion_consistency > > > > This RFC seems to be trying to force all

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Aleksander Machniak
On 08.04.2022 19:34, Craig Francis wrote: Hi, I've written a new draft RFC to address the NULL coercion problems: https://wiki.php.net/rfc/null_coercion_consistency As a voter, I'm in favor of this RFC. I suggest to rename "Documentation" section title to "Scalars coercion inconsistency"