Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-29 Thread Tim Düsterhus
Hi Preliminary note: I'll be on vacation starting tomorrow and thus might not be able to look into further replies. I wanted to get this email out of the door nevertheless to check off an open ToDo list item before the vacation and because I found it important to not leave the topic sitting a

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-29 Thread Kamil Tekiela
> Warning: non-representable float was cast to int Will this have a significant performance impact? > Warning: Cannot access offset of type TYPE on string Why is this a warning and not a TypeError? If the goal is to make the behavior identical to null coalesce operator then having a warning seem

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-29 Thread Jakub Zelenka
On Mon, Jul 28, 2025 at 7:17 PM Gina P. Banyard wrote: > On Monday, 28 July 2025 at 16:22, Tim Düsterhus wrote: > > > Am 2025-07-28 16:23, schrieb Gina P. Banyard: > > > > > As I am aware it is in bad taste to shove something new into such a > > > proposal minutes before starting the vote, > > >

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-29 Thread Rob Landers
On Tue, Jul 29, 2025, at 13:16, Alexandru Pătrănescu wrote: > > On Tue, Jul 29, 2025 at 12:18 PM Rob Landers wrote: >> __ >> >> I am not sure that (int)"INF" or (int)"NAN" is misbehaving. (int)"Password" >> also produces `0`, and these are strings. If we had the time to discuss it >> properl

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-29 Thread Alexandru Pătrănescu
On Tue, Jul 29, 2025 at 12:18 PM Rob Landers wrote: > > I am not sure that (int)"INF" or (int)"NAN" is misbehaving. > (int)"Password" also produces `0`, and these are strings. If we had the > time to discuss it properly, I would argue that simply warning when casting > a string to int is the most

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-29 Thread Rob Landers
On Tue, Jul 29, 2025, at 11:01, Gina P. Banyard wrote: > On Monday, 28 July 2025 at 19:08, Ilija Tovilo wrote: > > > Hi Gina > > > > On Mon, Jul 28, 2025 at 7:15 PM Gina P. Banyard intern...@gpb.moe wrote: > > > > > I find it increasingly frustrating that trying to make PHP not be > > > comple

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-29 Thread Gina P. Banyard
On Monday, 28 July 2025 at 19:08, Ilija Tovilo wrote: > Hi Gina > > On Mon, Jul 28, 2025 at 7:15 PM Gina P. Banyard intern...@gpb.moe wrote: > > > I find it increasingly frustrating that trying to make PHP not be > > completely insane is met with resistance at every turn, > > and I'm once more

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-28 Thread Ilija Tovilo
Hi Gina On Mon, Jul 28, 2025 at 7:15 PM Gina P. Banyard wrote: > > I find it increasingly frustrating that trying to make PHP not be completely > insane is met with resistance at every turn, > and I'm once more at the stage that I really should stop wasting my time and > caring about PHP and do

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-28 Thread Gina P. Banyard
On Monday, 28 July 2025 at 16:22, Tim Düsterhus wrote: > Am 2025-07-28 16:23, schrieb Gina P. Banyard: > > > As I am aware it is in bad taste to shove something new into such a > > proposal minutes before starting the vote, > > I'll postpone the vote for a few hours so that at least some people

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-28 Thread Tim Düsterhus
Hi Am 2025-07-28 16:23, schrieb Gina P. Banyard: As I am aware it is in bad taste to shove something new into such a proposal minutes before starting the vote, I'll postpone the vote for a few hours so that at least _some_ people can see and raise objections. For visibility: I object. See sib

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-28 Thread Tim Düsterhus
Hi Am 2025-07-28 16:20, schrieb Gina P. Banyard: I've added a whole new section that addresses this, as out of range casts are completely whack. See: https://wiki.php.net/rfc/warnings-php-8-5#casting_out_of_range_floats_to_int This effectively is another “Primary Vote” for an entirely new pro

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-28 Thread Gina P. Banyard
On Monday, 14 July 2025 at 17:20, Gina P. Banyard wrote: > Hello internals, > > Similar to the mass deprecation RFC, I would like to propose the addition of > a few warnings in certain situations: > https://wiki.php.net/rfc/warnings-php-8-5 > > I am expecting these 4 sub-proposals to be mostly

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-28 Thread Gina P. Banyard
On Wednesday, 23 July 2025 at 14:03, Tim Düsterhus wrote: > Hi > > Am 2025-07-23 13:30, schrieb Nicolas Grekas: > > > > About destructuring non-array values, null is a very common case that > > > allows writing nice readable code. > > > Here is a dummy example: > > > if ([$a, $b] = $array[$key]

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-28 Thread Gina P. Banyard
On Saturday, 26 July 2025 at 15:16, Claude Pache wrote: > > Le 14 juil. 2025 à 18:23, Gina P. Banyard intern...@gpb.moe a écrit : > > Hello internals, > > > > Similar to the mass deprecation RFC, I would like to propose the addition > > of a few warnings in certain situations: > > https://wiki

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-26 Thread Claude Pache
> Le 14 juil. 2025 à 18:23, Gina P. Banyard a écrit : > Hello internals, > > Similar to the mass deprecation RFC, I would like to propose the addition of > a few warnings in certain situations: > https://wiki.php.net/rfc/warnings-php-8-5 > > I am expecting these 4 sub-proposals to be mostly

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-23 Thread Tim Düsterhus
Hi Am 2025-07-23 13:30, schrieb Nicolas Grekas: About destructuring non-array values, null is a very common case that allows writing nice readable code. Here is a dummy example: if ([$a, $b] = $array[$key] ?? null) { /*...*/ } Turning this into a warning will have a significant impact for sure.

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-23 Thread Nicolas Grekas
Le ven. 18 juil. 2025 à 14:54, Gina P. Banyard a écrit : > On Tuesday, 15 July 2025 at 18:16, Nicolas Grekas < > nicolas.grekas+...@gmail.com> wrote: > > Hi Gina, > > Le lun. 14 juil. 2025 à 18:22, Gina P. Banyard a > écrit : > >> Hello internals, >> >> Similar to the mass deprecation RFC, I wou

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-18 Thread Gina P. Banyard
On Tuesday, 15 July 2025 at 20:42, Rob Landers wrote: > Hi Gina, I feel like destructuring `null` should not be the same warning as > other types since null auto-vivicates? to [] (an empty array). Instead, it > should provide the same warning as https://3v4l.org/8QPiD. Autovivification is only

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-18 Thread Gina P. Banyard
On Tuesday, 15 July 2025 at 18:16, Nicolas Grekas wrote: > Hi Gina, > > Le lun. 14 juil. 2025 à 18:22, Gina P. Banyard a écrit : > >> Hello internals, >> >> Similar to the mass deprecation RFC, I would like to propose the addition of >> a few warnings in certain situations: >> https://wiki.php

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-16 Thread Derick Rethans
On Mon, 14 Jul 2025, Gina P. Banyard wrote: > Similar to the mass deprecation RFC, I would like to propose the > addition of a few warnings in certain situations: > https://wiki.php.net/rfc/warnings-php-8-5 > > I am expecting these 4 sub-proposals to be mostly uncontroversial, > other than pos

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-15 Thread Rob Landers
On Mon, Jul 14, 2025, at 18:20, Gina P. Banyard wrote: > Hello internals, > > Similar to the mass deprecation RFC, I would like to propose the addition of > a few warnings in certain situations: > https://wiki.php.net/rfc/warnings-php-8-5 > > I am expecting these 4 sub-proposals to be mostly unc

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-15 Thread Nicolas Grekas
Hi Gina, Le lun. 14 juil. 2025 à 18:22, Gina P. Banyard a écrit : > Hello internals, > > Similar to the mass deprecation RFC, I would like to propose the addition > of a few warnings in certain situations: > https://wiki.php.net/rfc/warnings-php-8-5 > > I am expecting these 4 sub-proposals to be

[PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-14 Thread Gina P. Banyard
Hello internals, Similar to the mass deprecation RFC, I would like to propose the addition of a few warnings in certain situations: https://wiki.php.net/rfc/warnings-php-8-5 I am expecting these 4 sub-proposals to be mostly uncontroversial, other than possibly, the "Using offsets on non-containe