Remove param argument from php_verror - #22865
Conversation
Now that docref has been knocked out and error_include_args exists, remove this argument. Callers will be updated accordingly.
78933b4 to
759a1a4
Compare
Girgias
left a comment
There was a problem hiding this comment.
I think removing php_error and recommend the docref version instead makes sense.
Just to be clear, just the alias |
Yeah just the alias, I think there is a way to set php_docref to be used within "zend" as a lot of utility functions that are used by zend are actually defined in main/ but that's definitely something else. |
|
Cool, I'll try to tackle |
php-src commit 0a12b3e8268 (php/php-src#22865) removed the docref params argument from php_verror(), changing its signature from 5 to 4 arguments. Since a PHP_VERSION_ID guard cannot distinguish 8.6-dev snapshots taken before and after that change, format the message with vspprintf() and report it through php_error_docref(), whose signature is stable across all supported versions. Passing NULL docref and empty params to php_verror() was equivalent to php_error_docref(NULL, ...) anyway. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JNDQDyaiHPPMtsno9Kyo4t
Update tests and
UPGRADING.INTERNALS.Note there is some impact to extensions if they call this; however, it's usually in a centralized wrapper function which is easy to update. In my quick skim of external extensions, apcu is the only maintained one that'll need an update.
Also note that
php_verroris a bit weirdly named. It should probably be called something likephp_docref_verror, sincephp_error_docrefthe vararg wrapper around it (now that 1/2 are gone); let me know if this is something worth pursuing. There isphp_error, which is just an alias forzend_error, which doesn't take a docref, nor does it have the function and args prefix thatphp_verrorhas. It should be used for engine stuff, but I think there are a few places where it's called from places wherephp_error_docrefshould be used instead in extensions. I can take a look at that too.