Skip to content

Commit

Permalink
[PHP 8.4][Curl] Add CURLOPT_PREREQFUNCTION and constants
Browse files Browse the repository at this point in the history
`CURLOPT_PREREQFUNCTION` is a new Curl option added in PHP 8.4, along
with two constants `CURL_PREREQFUNC_ABORT` and `CURL_PREREQFUNC_OK`.

 - [php/php-src#13255](php/php-src#13255)
 - [libcurl doc - `CURLOPT_PREREQFUNCTION`](https://curl.se/libcurl/c/CURLOPT_PREREQFUNCTION.html)
 - [PHP.Watch Codex - `CURLOPT_PREREQFUNCTION`](https://php.watch/codex/CURLOPT_PREREQFUNCTION)
 - [PHP.Watch Codex - `CURL_PREREQFUNC_ABORT`](https://php.watch/codex/CURL_PREREQFUNC_ABORT)
 - [PHP.Watch Codex - `CURL_PREREQFUNC_OK`](https://php.watch/codex/CURL_PREREQFUNC_OK)
  • Loading branch information
Ayesh authored and isfedorov committed Aug 26, 2024
1 parent 85d2233 commit 4adffb7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions PhpStormStubsMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6995,6 +6995,7 @@ final class PhpStormStubsMap
'CURLOPT_POSTQUOTE' => 'curl/curl_d.php',
'CURLOPT_POSTREDIR' => 'curl/curl_d.php',
'CURLOPT_PREQUOTE' => 'curl/curl_d.php',
'CURLOPT_PREREQFUNCTION' => 'curl/curl_d.php',
'CURLOPT_PRE_PROXY' => 'curl/curl_d.php',
'CURLOPT_PRIVATE' => 'curl/curl_d.php',
'CURLOPT_PROGRESSFUNCTION' => 'curl/curl_d.php',
Expand Down Expand Up @@ -7257,6 +7258,8 @@ final class PhpStormStubsMap
'CURL_NETRC_IGNORED' => 'curl/curl_d.php',
'CURL_NETRC_OPTIONAL' => 'curl/curl_d.php',
'CURL_NETRC_REQUIRED' => 'curl/curl_d.php',
'CURL_PREREQFUNC_ABORT' => 'curl/curl_d.php',
'CURL_PREREQFUNC_OK' => 'curl/curl_d.php',
'CURL_PUSH_DENY' => 'curl/curl_d.php',
'CURL_PUSH_OK' => 'curl/curl_d.php',
'CURL_READFUNC_PAUSE' => 'curl/curl_d.php',
Expand Down
15 changes: 15 additions & 0 deletions curl/curl_d.php
Original file line number Diff line number Diff line change
Expand Up @@ -4343,3 +4343,18 @@
* @since 8.4
*/
define('CURL_HTTP_VERSION_3ONLY', 31);

/**
* @since 8.4
*/
define('CURLOPT_PREREQFUNCTION', 20312);

/**
* @since 8.4
*/
define('CURL_PREREQFUNC_OK', 0);

/**
* @since 8.4
*/
define('CURL_PREREQFUNC_ABORT', 1);
2 changes: 1 addition & 1 deletion meta/.phpstorm.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function argumentsSet($setName) {
\CURLOPT_CONNECT_TO, \CURLOPT_HTTP200ALIASES, \CURLOPT_HTTPHEADER, \CURLOPT_POSTQUOTE, \CURLOPT_PROXYHEADER, \CURLOPT_QUOTE, \CURLOPT_RESOLVE,
\CURLOPT_HEADERFUNCTION, \CURLOPT_PASSWDFUNCTION, \CURLOPT_PROGRESSFUNCTION, \CURLOPT_READFUNCTION, \CURLOPT_WRITEFUNCTION, \CURLOPT_SHARE,
\CURLOPT_FILE, \CURLOPT_INFILE, \CURLOPT_STDERR, \CURLOPT_WRITEHEADER,
\CURLOPT_ACCEPT_ENCODING, \CURLOPT_ADDRESS_SCOPE, \CURLOPT_APPEND, \CURLOPT_CRLFILE, \CURLOPT_DIRLISTONLY, \CURLOPT_DNS_SERVERS, \CURLOPT_FTP_ACCOUNT, \CURLOPT_FTP_ALTERNATIVE_TO_USER, \CURLOPT_FTP_RESPONSE_TIMEOUT, \CURLOPT_FTP_SKIP_PASV_IP, \CURLOPT_FTP_SSL, \CURLOPT_FTP_SSL_CCC, \CURLOPT_FTP_USE_PRET, \CURLOPT_HTTP_TRANSFER_DECODING, \CURLOPT_IGNORE_CONTENT_LENGTH, \CURLOPT_ISSUERCERT, \CURLOPT_KRBLEVEL, \CURLOPT_LOCALPORT, \CURLOPT_LOCALPORTRANGE, \CURLOPT_MAIL_FROM, \CURLOPT_MAIL_RCPT, \CURLOPT_MAXFILESIZE, \CURLOPT_NETRC_FILE, \CURLOPT_NEW_DIRECTORY_PERMS, \CURLOPT_NEW_FILE_PERMS, \CURLOPT_NOPROXY, \CURLOPT_PASSWORD, \CURLOPT_PREQUOTE, \CURLOPT_PROXYPASSWORD, \CURLOPT_PROXYUSERNAME, \CURLOPT_PROXY_TRANSFER_MODE, \CURLOPT_READDATA, \CURLOPT_REQUEST_TARGET, \CURLOPT_RTSP_CLIENT_CSEQ, \CURLOPT_RTSP_REQUEST, \CURLOPT_RTSP_SERVER_CSEQ, \CURLOPT_RTSP_SESSION_ID, \CURLOPT_RTSP_STREAM_URI, \CURLOPT_RTSP_TRANSPORT, \CURLOPT_SOCKS5_GSSAPI_NEC, \CURLOPT_SOCKS5_GSSAPI_SERVICE, \CURLOPT_SSH_KNOWNHOSTS, \CURLOPT_SSL_SESSIONID_CACHE, \CURLOPT_TFTP_BLKSIZE, \CURLOPT_TRANSFER_ENCODING, \CURLOPT_USE_SSL, \CURLOPT_TELNETOPTIONS, \CURLOPT_FNMATCH_FUNCTION, \CURLOPT_WILDCARDMATCH, \CURLOPT_TLSAUTH_PASSWORD, \CURLOPT_TLSAUTH_TYPE, \CURLOPT_TLSAUTH_USERNAME, \CURLOPT_GSSAPI_DELEGATION, \CURLOPT_ACCEPTTIMEOUT_MS, \CURLOPT_MAIL_AUTH);
\CURLOPT_ACCEPT_ENCODING, \CURLOPT_ADDRESS_SCOPE, \CURLOPT_APPEND, \CURLOPT_CRLFILE, \CURLOPT_DIRLISTONLY, \CURLOPT_DNS_SERVERS, \CURLOPT_FTP_ACCOUNT, \CURLOPT_FTP_ALTERNATIVE_TO_USER, \CURLOPT_FTP_RESPONSE_TIMEOUT, \CURLOPT_FTP_SKIP_PASV_IP, \CURLOPT_FTP_SSL, \CURLOPT_FTP_SSL_CCC, \CURLOPT_FTP_USE_PRET, \CURLOPT_HTTP_TRANSFER_DECODING, \CURLOPT_IGNORE_CONTENT_LENGTH, \CURLOPT_ISSUERCERT, \CURLOPT_KRBLEVEL, \CURLOPT_LOCALPORT, \CURLOPT_LOCALPORTRANGE, \CURLOPT_MAIL_FROM, \CURLOPT_MAIL_RCPT, \CURLOPT_MAXFILESIZE, \CURLOPT_NETRC_FILE, \CURLOPT_NEW_DIRECTORY_PERMS, \CURLOPT_NEW_FILE_PERMS, \CURLOPT_NOPROXY, \CURLOPT_PASSWORD, \CURLOPT_PREQUOTE, \CURLOPT_PROXYPASSWORD, \CURLOPT_PROXYUSERNAME, \CURLOPT_PROXY_TRANSFER_MODE, \CURLOPT_READDATA, \CURLOPT_REQUEST_TARGET, \CURLOPT_RTSP_CLIENT_CSEQ, \CURLOPT_RTSP_REQUEST, \CURLOPT_RTSP_SERVER_CSEQ, \CURLOPT_RTSP_SESSION_ID, \CURLOPT_RTSP_STREAM_URI, \CURLOPT_RTSP_TRANSPORT, \CURLOPT_SOCKS5_GSSAPI_NEC, \CURLOPT_SOCKS5_GSSAPI_SERVICE, \CURLOPT_SSH_KNOWNHOSTS, \CURLOPT_SSL_SESSIONID_CACHE, \CURLOPT_TFTP_BLKSIZE, \CURLOPT_TRANSFER_ENCODING, \CURLOPT_USE_SSL, \CURLOPT_TELNETOPTIONS, \CURLOPT_FNMATCH_FUNCTION, \CURLOPT_WILDCARDMATCH, \CURLOPT_TLSAUTH_PASSWORD, \CURLOPT_TLSAUTH_TYPE, \CURLOPT_TLSAUTH_USERNAME, \CURLOPT_GSSAPI_DELEGATION, \CURLOPT_ACCEPTTIMEOUT_MS, \CURLOPT_MAIL_AUTH, \CURLOPT_PREREQFUNCTION);
expectedArguments(\curl_setopt(), 2, \CURLAUTH_ANY | \CURLAUTH_ANYSAFE | \CURLAUTH_BASIC | \CURLAUTH_BEARER | \CURLAUTH_DIGEST | \CURLAUTH_GSSAPI | \CURLAUTH_GSSNEGOTIATE | \CURLAUTH_NEGOTIATE | \CURLAUTH_NTLM | \CURLAUTH_NTLM_WB | \CURLSSH_AUTH_AGENT | \CURLSSH_AUTH_GSSAPI, \CURL_SSLVERSION_DEFAULT, \CURL_SSLVERSION_MAX_DEFAULT, \CURL_SSLVERSION_MAX_NONE, \CURL_SSLVERSION_MAX_TLSv1_0, \CURL_SSLVERSION_MAX_TLSv1_1, \CURL_SSLVERSION_MAX_TLSv1_2, \CURL_SSLVERSION_MAX_TLSv1_3, \CURL_SSLVERSION_SSLv2, \CURL_SSLVERSION_SSLv3, \CURL_SSLVERSION_TLSv1, \CURL_SSLVERSION_TLSv1_0, \CURL_SSLVERSION_TLSv1_1, \CURL_SSLVERSION_TLSv1_2, \CURL_SSLVERSION_TLSv1_3,
\CURLFTPAUTH_DEFAULT, \CURLFTPAUTH_SSL, \CURLFTPAUTH_TLS, \CURLFTPMETHOD_MULTICWD, \CURLFTPMETHOD_NOCWD, \CURLFTPMETHOD_SINGLECWD, \CURLFTPSSL_ALL, \CURLFTPSSL_CONTROL, \CURLFTPSSL_NONE, \CURLFTPSSL_TRY, \CURLFTP_CREATE_DIR, \CURLFTP_CREATE_DIR_NONE, \CURLFTP_CREATE_DIR_RETRY,
\CURLPROTO_ALL | \CURLPROTO_DICT | \CURLPROTO_FILE | \CURLPROTO_FTP | \CURLPROTO_FTPS | \CURLPROTO_HTTPS | \CURLPROTO_LDAP | \CURLPROTO_LDAPS | \CURLPROTO_SCP | \CURLPROTO_SFTP | \CURLPROTO_SMB | \CURLPROTO_SMBS | \CURLPROTO_TELNET | \CURLPROTO_TFTP, \CURLPROXY_HTTP, \CURLPROXY_HTTPS, \CURLPROXY_HTTP_1_0, \CURLPROXY_SOCKS4, \CURLPROXY_SOCKS5,
Expand Down

0 comments on commit 4adffb7

Please sign in to comment.