Re: Changelog / upgrading notes for promoted warnings
| From: | G. P. B. | Date: | Fri, 20 Dec 2019 00:33:49 +0000 |
| Subject: | Re: Changelog / upgrading notes for promoted warnings | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107933@lists.php.net to get a copy of this message | ||
On Thu, 19 Dec 2019, 21:17 Rowan Tommins, <rowan.collins@gmail.com> wrote:
> Hi all,
>
> Earlier, I was writing an application-specific wrapper around the
> password_hash function, and was surprised that it could return false,
> rather than throwing an error.
>
> I then found this commit to master making it throw errors for PHP 8.0:
> https://github.com/php/php-src/commit/37c11714
>
> That's great! But ... it is a breaking change, and I can't see any note
> in UPGRADING. Is there a running list of the Warnings that have been
> promoted to Errors anywhere, and if not, should we create one before we
> forget?
>
> Regards,
>
> --
> Rowan Tommins (né Collins)
> [IMSoP]
>
As there are a lot more of these promotion, from what I recall, is that a
general upgrading note will be added.
As the promotions cover case which are clear programming/logic errors and
thus shouldn't arise in production code.
An example of a promotion is an invalid flag value (e.g. a mode with fopen
which does not exist) or out of bound values (usually integer value which
need to be greater than zero).
Moreover, I'm not sure it's helpful to have a massive list of functions
where some warnings have been promoted and others not. But this is only my
opinion.
Best regards
George P. Banyard
>