Re: [RFC] Replace "Missing argument" warning with "Too few arguments" exception
| From: | Aaron Piotrowski | Date: | Wed, 01 Jun 2016 23:19:54 +0000 |
| Subject: | Re: [RFC] Replace "Missing argument" warning with "Too few arguments" exception | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93702@lists.php.net to get a copy of this message | ||
> On Jun 1, 2016, at 3:56 PM, Rowan Collins <rowan.collins@gmail.com> wrote:
>
> On 01/06/2016 19:36, Aaron Piotrowski wrote:
>> While this might be considered a BC break, I can't imagine there's an actual code
>> out there relying on suppressing the warning just to call a function without enough arguments. I see
>> no problem putting this change in 7.1.
>
> I think you're overestimating how much people care about their code running without
> warnings. You don't have to suppress anything, just lazily ignore warnings, or log them to a
> file you never get round to reading. It *might* be that most users spot and act on the warnings, but
> I'm not sure how we could know that with any confidence.
>
Perhaps I'm overestimating how much people care about eliminating warnings, but I doubt many
functions work as intended without being supplied all required arguments. The few situations where
code worked as intended when too few arguments were provided to a function are fragile and should be
fixed. This change will better alert users to those problems.
Aaron Piotrowski