Skip to content

curl_setopt(_array): document ValueError for invalid options - #5922

Merged
lacatoire merged 2 commits into
php:masterfrom
SatvikMishra08:docs/3119-curl-setopt-valueerror
Oct 9, 2026
Merged

lacatoire merged 2 commits into
php:masterfrom
SatvikMishra08:docs/3119-curl-setopt-valueerror

Conversation

@SatvikMishra08

Copy link
Copy Markdown
Contributor

Closes #3119

Documents the PHP 8.0 change where invalid cURL options raise a ValueError instead of emitting an E_WARNING (see php/php-src#5963 and the general PHP 8 internal-function exception promotion).

Changes

  • curl_setopt: add Errors section; add 8.0.0 Changelog row for invalid-option ValueError
  • curl_setopt_array: same Errors + Changelog treatment for invalid options in the options array

Existing Changelog rows (e.g. CurlHandle parameter, new constants) are left unchanged.

Add Errors sections and PHP 8.0.0 changelog entries noting that
invalid cURL options now throw ValueError instead of emitting
E_WARNING (php/php-src#5963 / PHP 8 internal function exceptions).

Closes php#3119
Comment thread reference/curl/functions/curl-setopt.xml Outdated
Comment thread reference/curl/functions/curl-setopt-array.xml Outdated

@lacatoire lacatoire left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SatvikMishra08 a few nits & some lint nits but LGTM

@lacatoire
lacatoire merged commit 0c5b5b9 into php:master Oct 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

curl_setopt missing error/exception documentation

2 participants