Re: [RFC] Grouped ValueError Conversions for PHP 8.6 (mkdir example)
| From: | Christian Schneider | Date: | Wed, 18 Feb 2026 21:21:48 +0000 |
| Subject: | Re: [RFC] Grouped ValueError Conversions for PHP 8.6 (mkdir example) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-130091@lists.php.net to get a copy of this message | ||
Am 18.02.2026 um 20:32 schrieb Muhammed Arshid KV <arshidkv12@gmail.com>:
> Following maintainer feedback, I’ve created an RFC to group multiple warning → ValueError
> conversions for PHP 8.6 instead of proposing many small RFCs.
> The initial example includes mkdir() where invalid permission values (outside 0..07777) would
> throw ValueError instead of emitting a warning and returning false.
When converting something which has currently silently ignored (part of its) parameters to a
ValueError Exception, you should add an E_WARNING phase to give developers a time window to fix
their code.
Example:
mkdir("foo", 070555)); # Currently does the same thing as 0555
The E_WARNING phase enables developers to catch writing 555 instead of 0555, but it allows fixing
the code without being a blocker for upgrading to PHP 8.6.
Regards,
- Chris