-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add Curl ext PHP stubs #4557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+335
−166
Closed
Add Curl ext PHP stubs #4557
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
80f5f6d
Add Curl ext PHP stubs
simPod c8ae9fe
Update ext/curl/curl.stub.php
simPod 49e6d29
Update ext/curl/curl.stub.php
simPod 9fff813
Update ext/curl/curl.stub.php
simPod 8933ea9
Update ext/curl/curl.stub.php
simPod ee0be4e
Update ext/curl/curl.stub.php
simPod 3ee981c
Update ext/curl/curl.stub.php
simPod 914b536
Update ext/curl/curl.stub.php
simPod 87b1ce9
Update ext/curl/curl.stub.php
simPod 3d2394f
Update ext/curl/curl.stub.php
simPod 20d918a
Update ext/curl/curl.stub.php
simPod 05e909c
review
simPod 36ada73
curl file
simPod 1af0822
curlfile return type
simPod aee706b
add missing arginfos
simPod 488b817
remove hard return types
simPod File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
<?php | ||
|
||
/** @param resource $handle */ | ||
function curl_close($handle): void {} | ||
|
||
/** | ||
* @param resource $handle | ||
* | ||
* @return resource|false | ||
*/ | ||
function curl_copy_handle($handle) {} | ||
|
||
/** @param resource $handle */ | ||
function curl_errno($handle): int {} | ||
|
||
/** @param resource $handle */ | ||
function curl_error($handle): string {} | ||
|
||
/** | ||
* @param resource $handle | ||
* | ||
* @return string|false | ||
*/ | ||
function curl_escape($handle, string $string) {} | ||
|
||
/** | ||
* @param resource $handle | ||
* | ||
* @return mixed|false | ||
*/ | ||
function curl_exec($handle) {} | ||
|
||
/** @return CURLFile */ | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
function curl_file_create( | ||
string $filename, | ||
string $mimetype = UNKNOWN, | ||
string $postname = UNKNOWN | ||
) {} | ||
|
||
function curl_file_name(string $name): void {} | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* @param resource $handle | ||
* | ||
* @return mixed|mixed[]|false | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*/ | ||
function curl_getinfo($handle, int $option = UNKNOWN) {} | ||
|
||
/** | ||
* @param resource $handle | ||
* | ||
* @return resource|false | ||
*/ | ||
function curl_init($handle) {} | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* @param resource $multi_handle | ||
* @param resource $handle | ||
*/ | ||
function curl_multi_add_handle($multi_handle, $handle): int {} | ||
|
||
/** @param resource $multi_handle */ | ||
function curl_multi_close($multi_handle): void {} | ||
|
||
/** | ||
* @param resource $multi_handle | ||
* | ||
* @return int|false | ||
*/ | ||
function curl_multi_errno($multi_handle) {} | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** @param resource $multi_handle */ | ||
function curl_multi_exec($multi_handle, int &$still_running): int {} | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** @param resource $multi_handle */ | ||
function curl_multi_getcontent($multi_handle): ?string {} | ||
|
||
/** | ||
* @param resource $multi_handle | ||
* | ||
* @return array<string, mixed>|false | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*/ | ||
function curl_multi_info_read($multi_handle, ?int &$msgs_in_queue = null) {} | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** @return resource */ | ||
function curl_multi_init() {} | ||
|
||
/** | ||
* @param resource $multi_handle | ||
* @param resource $handle | ||
*/ | ||
function curl_multi_remove_handle($multi_handle, $handle): int {} | ||
|
||
/** @param resource $multi_handle */ | ||
function curl_multi_select($multi_handle, float $timeout = UNKNOWN): int {} | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* @param resource $multi_handle | ||
* @param mixed $value | ||
*/ | ||
function curl_multi_setopt($multi_handle, int $option, $value): bool {} | ||
|
||
function curl_multi_strerror(int $error_number): ?string {} | ||
|
||
/** @param resource $handle */ | ||
function curl_pause($handle, int $bitmask): int {} | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** @param resource $handle */ | ||
function curl_reset($handle): void {} | ||
|
||
/** | ||
* @param resource $handle | ||
* @param array<int, mixed> $options | ||
*/ | ||
function curl_setopt_array($handle, array $options): bool {} | ||
|
||
|
||
/** | ||
* @param resource $handle | ||
* @param mixed $value | ||
*/ | ||
function curl_setopt($handle, int $option, $value): bool {} | ||
|
||
/** @param resource $share_handle */ | ||
function curl_share_close($share_handle): void {} | ||
|
||
/** @param resource $share_handle */ | ||
function curl_share_errno($share_handle): int {} | ||
|
||
/** @return resource */ | ||
function curl_share_init() {} | ||
|
||
/** @param resource $share_handle */ | ||
function curl_share_setopt($share_handle, int $option, int $value): bool {} | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
function curl_share_strerror(int $error_number): ?string {} | ||
|
||
function curl_strerror(int $error_number): ?string {} | ||
|
||
/** | ||
* @param resource $handle | ||
* | ||
* @return string|false | ||
*/ | ||
function curl_unescape($handle, string $string) {} | ||
|
||
/** @return array<string, mixed>|false */ | ||
simPod marked this conversation as resolved.
Show resolved
Hide resolved
|
||
function curl_version(int $age = UNKNOWN) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
/* This is a generated file, edit the .stub.php file instead. */ | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_close, 0, 1, IS_VOID, 0) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_copy_handle, 0, 0, 1) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_errno, 0, 1, IS_LONG, 0) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_error, 0, 1, IS_STRING, 0) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_escape, 0, 0, 2) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
#define arginfo_curl_exec arginfo_curl_copy_handle | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_file_create, 0, 0, 1) | ||
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) | ||
ZEND_ARG_TYPE_INFO(0, mimetype, IS_STRING, 0) | ||
ZEND_ARG_TYPE_INFO(0, postname, IS_STRING, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_file_name, 0, 1, IS_VOID, 0) | ||
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_getinfo, 0, 0, 1) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
#define arginfo_curl_init arginfo_curl_copy_handle | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_add_handle, 0, 2, IS_LONG, 0) | ||
ZEND_ARG_INFO(0, multi_handle) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_close, 0, 1, IS_VOID, 0) | ||
ZEND_ARG_INFO(0, multi_handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_errno, 0, 0, 1) | ||
ZEND_ARG_INFO(0, multi_handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_exec, 0, 2, IS_LONG, 0) | ||
ZEND_ARG_INFO(0, multi_handle) | ||
ZEND_ARG_TYPE_INFO(1, still_running, IS_LONG, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_getcontent, 0, 1, IS_STRING, 1) | ||
ZEND_ARG_INFO(0, multi_handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_info_read, 0, 0, 1) | ||
ZEND_ARG_INFO(0, multi_handle) | ||
ZEND_ARG_TYPE_INFO(1, msgs_in_queue, IS_LONG, 1) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_init, 0, 0, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
#define arginfo_curl_multi_remove_handle arginfo_curl_multi_add_handle | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_select, 0, 1, IS_LONG, 0) | ||
ZEND_ARG_INFO(0, multi_handle) | ||
ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_setopt, 0, 3, _IS_BOOL, 0) | ||
ZEND_ARG_INFO(0, multi_handle) | ||
ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) | ||
ZEND_ARG_INFO(0, value) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_multi_strerror, 0, 1, IS_STRING, 1) | ||
ZEND_ARG_TYPE_INFO(0, error_number, IS_LONG, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_pause, 0, 2, IS_LONG, 0) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_ARG_TYPE_INFO(0, bitmask, IS_LONG, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
#define arginfo_curl_reset arginfo_curl_close | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_setopt_array, 0, 2, _IS_BOOL, 0) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_setopt, 0, 3, _IS_BOOL, 0) | ||
ZEND_ARG_INFO(0, handle) | ||
ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) | ||
ZEND_ARG_INFO(0, value) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_share_close, 0, 1, IS_VOID, 0) | ||
ZEND_ARG_INFO(0, share_handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_share_errno, 0, 1, IS_LONG, 0) | ||
ZEND_ARG_INFO(0, share_handle) | ||
ZEND_END_ARG_INFO() | ||
|
||
#define arginfo_curl_share_init arginfo_curl_multi_init | ||
|
||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_curl_share_setopt, 0, 3, _IS_BOOL, 0) | ||
ZEND_ARG_INFO(0, share_handle) | ||
ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) | ||
ZEND_ARG_TYPE_INFO(0, value, IS_LONG, 0) | ||
ZEND_END_ARG_INFO() | ||
|
||
#define arginfo_curl_share_strerror arginfo_curl_multi_strerror | ||
|
||
#define arginfo_curl_strerror arginfo_curl_multi_strerror | ||
|
||
#define arginfo_curl_unescape arginfo_curl_escape | ||
|
||
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_version, 0, 0, 0) | ||
ZEND_ARG_TYPE_INFO(0, age, IS_LONG, 0) | ||
ZEND_END_ARG_INFO() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.