[RFC] Grouped ValueError Conversions for PHP 8.6 (mkdir example)

php.internals

Muhammed Arshid KV

195 days ago
Hello internals, 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. RFC draft: https://wiki.php.net/rfc/php86_valueerror_conversions Initial implementation PR: https://github.com/php/php-src/pull/21152 Feedback is welcome. Thanks, Muhammed Arshid KV

Christian Schneider

194 days ago
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

Jakub Zelenka

194 days ago
Hi, On Wed, Feb 18, 2026 at 8:39 PM Muhammed Arshid KV <arshidkv12@gmail.com> wrote:
> Hello internals, > > 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. > > RFC draft: > https://wiki.php.net/rfc/php86_valueerror_conversions >
Please check the deprecation RFC out: https://wiki.php.net/rfc/deprecations_php_8_6 . It should be done in a similar way with section for each different case. There should be then multiple votes. Cheers Jakub