[PHP-DEV] [RFC] Deprecate passing null to non-nullable arguments of internal functions

2021-09-17 Thread Craig Francis
Hi Internals, https://externals.io/message/112327 https://externals.io/message/112996 Considering how frequently developers use this pattern: $name = ($_POST['name'] ?? NULL); Sometimes without really noticing, e.g. - Laravel: `$request->input('name');` - Symfony: `$request->get('name');`

Re: [PHP-DEV] [RFC] Deprecate passing null to non-nullable arguments of internal functions

2021-01-07 Thread Nikita Popov
On Wed, Dec 16, 2020 at 10:50 PM Craig Duncan wrote: > While making internal functions treat non-nullable types consistently with > userland is an absolute win, > I do wonder if it should be done simultaneously with changing some > functions > to formally accept nulls. > PHP 8 made quite a few

Re: [PHP-DEV] [RFC] Deprecate passing null to non-nullable arguments of internal functions

2020-12-16 Thread Craig Duncan
While making internal functions treat non-nullable types consistently with userland is an absolute win, I do wonder if it should be done simultaneously with changing some functions to formally accept nulls. I'm thinking back to all the pain caused when *count() *starting raising a warning for

Re: [PHP-DEV] [RFC] Deprecate passing null to non-nullable arguments of internal functions

2020-12-02 Thread tyson andre
Hi Nikita, > I've put up an RFC to make the handling of "null" arguments consistent > between internal and user-defined functions: > > https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg > > I started an informal discussion for this change during the 7.4 cycle > already, but decided

Re: [PHP-DEV] [RFC] Deprecate passing null to non-nullable arguments of internal functions

2020-12-01 Thread Josh Bruce
> On Dec 1, 2020, at 8:57 AM, Nikita Popov wrote: > > I've put up an RFC to make the handling of "null" arguments consistent > between internal and user-defined functions: > > https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg >

Re: [PHP-DEV] [RFC] Deprecate passing null to non-nullable arguments of internal functions

2020-12-01 Thread Larry Garfield
On Tue, Dec 1, 2020, at 8:57 AM, Nikita Popov wrote: > Hi internals, > > I've put up an RFC to make the handling of "null" arguments consistent > between internal and user-defined functions: > > https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg > > I started an informal discussion

Re: [PHP-DEV] [RFC] Deprecate passing null to non-nullable arguments of internal functions

2020-12-01 Thread Sebastian Bergmann
Am 01.12.2020 um 15:57 schrieb Nikita Popov: I've put up an RFC to make the handling of "null" arguments consistent between internal and user-defined functions: Makes sense to me, +1. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] [RFC] Deprecate passing null to non-nullable arguments of internal functions

2020-12-01 Thread Nikita Popov
Hi internals, I've put up an RFC to make the handling of "null" arguments consistent between internal and user-defined functions: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg I started an informal discussion for this change during the 7.4 cycle already, but decided to postpone