Consensus on argument validation for built-in functions

From: Date: Mon, 10 Mar 2025 23:07:33 +0000
Subject: Consensus on argument validation for built-in functions
Groups: php.internals 
Request: Send a blank email to internals+get-126706@lists.php.net to get a copy of this message
Hello everyone, I’d like to align on the approach to validating arguments for built-in functions (usually for flag inputs). Some ongoing discussions in PRs: - https://github.com/php/php-src/pull/15647 - https://github.com/php/php-src/pull/15883 - https://github.com/php/php-src/pull/17859 In some cases, changes introduced ValueError immediately in the next version, without a deprecation phase. To ensure a consistent approach, I propose the following: 1. Introduce a deprecation notice in the next minor version. 2. Raise a ValueError in the following minor version. If needed, I can create RFC, but as described by a few people in the discussions, we can avoid it having the consensus. What do you think? Kind regards, Jorg Sowa

« previous php.internals (#126706) next »