Re: [PHP-DEV] Re: Warn when declaring required parameter after optional one

2020-02-05 Thread Nikita Popov
On Sun, Jan 19, 2020 at 10:15 PM Andrea Faulds wrote: > Hi Nikita, > > Nikita Popov wrote: > > > > Since nullable types have been available since PHP 7.1, having a required > > parameter after an optional one is increasingly likely a bug rather than > an > > intentional workaround, so I think it

[PHP-DEV] Re: Warn when declaring required parameter after optional one

2020-01-19 Thread Andrea Faulds
Hi Nikita, Nikita Popov wrote: Since nullable types have been available since PHP 7.1, having a required parameter after an optional one is increasingly likely a bug rather than an intentional workaround, so I think it would be good to throw a warning for this case. Wouldn't it be trivial to