PHP 7.4 stubs initial support + switch to PHP 7.4 docker image

This commit is contained in:
Maxim.Kolmakov 2019-12-05 17:54:10 +01:00
parent 6e6084354f
commit a8b8caf544
15 changed files with 341 additions and 134 deletions

View File

@ -1,4 +1,4 @@
FROM php:7.3
FROM php:7.4
RUN set -x \
&& apt-get update \
&& apt-get install -y libldap2-dev libxml2-dev librabbitmq-dev libssh-dev libbz2-dev libevent-dev libfann-dev libgpgme11-dev librdkafka-dev librrd-dev libyaml-dev libcurl4-openssl-dev\

View File

@ -830,6 +830,15 @@ class PDO {
const SQLSRV_CURSOR_STATIC = 3;
const SQLSRV_CURSOR_BUFFERED = 42;
/**
* @since 7.4
*/
const SQLITE_ATTR_READONLY_STATEMENT = 1;
/**
* @since 7.4
*/
const SQLITE_ATTR_EXTENDED_RESULT_CODES = 2;
/**
* (PHP 5 &gt;= 5.1.0, PHP 7, PECL pdo &gt;= 0.1.0)<br/>
* Creates a PDO instance representing a connection to a database

View File

@ -1771,6 +1771,18 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
*/
public function serialize() { }
/**
* @return array
* @since 7.4
*/
public function __serialize(): array {}
/**
* @param array $data
* @since 7.4
*/
public function __unserialize(array $data): void {}
/**
* Create a new iterator from an ArrayObject instance
* @link https://php.net/manual/en/arrayobject.getiterator.php
@ -2051,6 +2063,19 @@ class ArrayIterator implements SeekableIterator, ArrayAccess, Serializable, Coun
* @since 5.0
*/
public function seek($position) { }
/**
* @return array
* @since 7.4
*/
public function __serialize(): array {}
/**
* @param array $data
* @since 7.4
*/
public function __unserialize(array $data): void {}
}
/**

View File

@ -1193,6 +1193,18 @@ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializa
*/
public function serialize () {}
/**
* @return array
* @since 7.4
*/
public function __serialize(): array {}
/**
* @param array $data
* @since 7.4
*/
public function __unserialize(array $data): void {}
}
/**
@ -2106,6 +2118,18 @@ class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess
*/
public function getHash($object) {}
/**
* @return array
* @since 7.4
*/
public function __serialize(): array {}
/**
* @param array $data
* @since 7.4
*/
public function __unserialize(array $data): void {}
}
/**

View File

@ -362,6 +362,10 @@ function mhash ($hash, $data, $key = null) {}
*/
define ('HASH_HMAC', 1);
define ('MHASH_CRC32', 0);
/**
* @since 7.4
*/
define ('MHASH_CRC32C', 34);
define ('MHASH_MD5', 1);
define ('MHASH_SHA1', 2);
define ('MHASH_HAVAL256', 3);

View File

@ -1364,6 +1364,16 @@ function mb_scrub($str, $encoding) {}
*/
function mbereg_search_setpos ($position) {}
/**
* Function performs string splitting to an array of defined size chunks.
* @param string $str
* @param int $split_length [optional]
* @param string $encoding [optional]
* @return string[]
* @since 7.4
*/
function mb_str_split($str, $split_length, $encoding){}
define ('MB_OVERLOAD_MAIL', 1);
define ('MB_OVERLOAD_STRING', 2);
define ('MB_OVERLOAD_REGEX', 4);
@ -1391,5 +1401,10 @@ define('MB_CASE_TITLE_SIMPLE', 6);
*/
define('MB_CASE_FOLD_SIMPLE', 7);
/**
* @since 7.4
*/
define('MB_ONIGURUMA_VERSION', '6.9.1');
// End of mbstring v.
?>

View File

@ -1857,10 +1857,9 @@ function mysqli_get_client_info () {}
/**
* Returns the MySQL client version as an integer
* @link https://php.net/manual/en/mysqli.get-client-version.php
* @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init()
* @return int
*/
function mysqli_get_client_version ($link) {}
function mysqli_get_client_version () {}
/**
* Returns a string representing the type of connection used

View File

@ -388,6 +388,11 @@ function openssl_x509_export($x509, &$output, $notext = true) { }
*/
function openssl_x509_export_to_file($x509, $outfilename, $notext = true) { }
/**
* @since 7.4
*/
function openssl_x509_verify($cert, $key){}
/**
* Exports a PKCS#12 Compatible Certificate Store File to variable.
* @link https://php.net/manual/en/function.openssl-pkcs12-export.php
@ -1228,22 +1233,34 @@ define('OPENSSL_DEFAULT_STREAM_CIPHERS', "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDS
define ('STREAM_CRYPTO_METHOD_SSLv2_CLIENT', 3);
define ('STREAM_CRYPTO_METHOD_SSLv3_CLIENT', 5);
define ('STREAM_CRYPTO_METHOD_SSLv23_CLIENT', 57);
define ('STREAM_CRYPTO_METHOD_TLS_CLIENT', 57);
define ('STREAM_CRYPTO_METHOD_TLS_CLIENT', 121);
define ('STREAM_CRYPTO_METHOD_SSLv2_SERVER', 2);
define ('STREAM_CRYPTO_METHOD_SSLv3_SERVER', 4);
define ('STREAM_CRYPTO_METHOD_SSLv23_SERVER', 56);
define ('STREAM_CRYPTO_METHOD_TLS_SERVER', 56);
define ('STREAM_CRYPTO_METHOD_SSLv23_SERVER', 120);
define ('STREAM_CRYPTO_METHOD_TLS_SERVER', 120);
define("STREAM_CRYPTO_METHOD_ANY_CLIENT", 63);
define("STREAM_CRYPTO_METHOD_ANY_SERVER", 62);
define("STREAM_CRYPTO_METHOD_ANY_CLIENT", 127);
define("STREAM_CRYPTO_METHOD_ANY_SERVER", 126);
define("STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT", 9);
define("STREAM_CRYPTO_METHOD_TLSv1_0_SERVER", 8);
define("STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT", 17);
define("STREAM_CRYPTO_METHOD_TLSv1_1_SERVER", 16);
define("STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT", 33);
define("STREAM_CRYPTO_METHOD_TLSv1_2_SERVER", 32);
/**
* @since 7.4
*/
define("STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT", 65);
/**
* @since 7.4
*/
define("STREAM_CRYPTO_METHOD_TLSv1_3_SERVER", 64);
define("STREAM_CRYPTO_PROTO_SSLv3", 4);
define("STREAM_CRYPTO_PROTO_TLSv1_0", 8);
define("STREAM_CRYPTO_PROTO_TLSv1_1", 16);
define("STREAM_CRYPTO_PROTO_TLSv1_2", 32);
/**
* @since 7.4
*/
define("STREAM_CRYPTO_PROTO_TLSv1_3", 64);

View File

@ -485,6 +485,11 @@ function pcntl_async_signals($on = null) {}
*/
function pcntl_signal_get_handler($signo) {}
/**
* @sine 7.4
*/
function pcntl_unshare($flags){}
define ('WNOHANG', 1);
define ('WUNTRACED', 2);
define ('WCONTINUED', 8);
@ -834,5 +839,50 @@ define ('PCNTL_ENOEXEC', 8);
define ('PCNTL_ENOTDIR', 20);
define ('PCNTL_ETXTBSY', 26);
/**
* @since 7.4
*/
define ('PCNTL_ENOSPC', 28);
/**
* @since 7.4
*/
define ('PCNTL_EUSERS', 87);
/**
* @since 7.4
*/
define('CLONE_NEWNS', 131072);
/**
* @since 7.4
*/
define('CLONE_NEWIPC', 134217728);
/**
* @since 7.4
*/
define('CLONE_NEWUTS', 67108864);
/**
* @since 7.4
*/
define('CLONE_NEWNET', 1073741824);
/**
* @since 7.4
*/
define('CLONE_NEWPID', 536870912);
/**
* @since 7.4
*/
define('CLONE_NEWUSER', 268435456);
/**
* @since 7.4
*/
define('CLONE_NEWCGROUP', 33554432);
// End of pcntl v.
?>

View File

@ -313,7 +313,7 @@ function preg_replace ($pattern, $replacement, $subject, $limit = -1, &$count =
/**
* Perform a regular expression search and replace using a callback
* @link https://php.net/manual/en/function.preg-replace-callback.php
* @param string|string[] $pattern <p>
* @param string|string[] $regex <p>
* The pattern to search for. It can be either a string or an array with
* strings.
* </p>
@ -370,6 +370,7 @@ function preg_replace ($pattern, $replacement, $subject, $limit = -1, &$count =
* If specified, this variable will be filled with the number of
* replacements done.
* </p>
* @param array $flags [optional]
* @return string|string[]|null <b>preg_replace_callback</b> returns an array if the
* <i>subject</i> parameter is an array, or a string
* otherwise. On errors the return value is <b>NULL</b>
@ -380,7 +381,7 @@ function preg_replace ($pattern, $replacement, $subject, $limit = -1, &$count =
* @since 4.0.5
* @since 5.0
*/
function preg_replace_callback ($pattern, callable $callback, $subject, $limit = -1, &$count = null) {}
function preg_replace_callback ($regex, callable $callback, $subject, $limit = -1, &$count = null, $flags=[]) {}
/**
* Perform a regular expression search and replace using callbacks
@ -389,10 +390,11 @@ function preg_replace_callback ($pattern, callable $callback, $subject, $limit =
* @param string|string[] $subject
* @param int $limit [optional]
* @param int $count [optional]
* @param array $flags [optional]
* @return string|string[]|null <p>preg_replace_callback_array() returns an array if the subject parameter is an array, or a string otherwise. On errors the return value is NULL</p>
* <p>If matches are found, the new subject will be returned, otherwise subject will be returned unchanged.</p>
*/
function preg_replace_callback_array ($patterns_and_callbacks, $subject , $limit = -1, &$count = null) {}
function preg_replace_callback_array ($patterns_and_callbacks, $subject , $limit = -1, &$count = null, $flags = []) {}
/**
* Perform a regular expression search and replace
@ -615,7 +617,7 @@ define ('PCRE_VERSION_MAJOR', 10);
/**
* @since 7.3
*/
define ('PCRE_VERSION_MINOR', 32);
define ('PCRE_VERSION_MINOR', 33);
/**
* @since 7.3

View File

@ -286,6 +286,26 @@ class SQLite3 {
*/
public function __construct ($filename, $flags = null, $encryption_key = null) {}
/**
* @return int
* @since 7.4
*/
public function lastExtendedErrorCode(){}
/**
* @param $enable
* @since 7.4
*/
public function enableExtendedResultCodes($enable){}
/**
* @param $destination_db
* @param $source_dbname
* @param $destination_dbname
* @since 7.4
*/
public function backup($destination_db, $source_dbname, $destination_dbname){}
}
/**
@ -389,6 +409,15 @@ class SQLite3Stmt {
*/
private function __construct ($sqlite3) {}
/**
* Retrieves the SQL of the prepared statement. If expanded is FALSE, the unmodified SQL is retrieved.
* If expanded is TRUE, all query parameters are replaced with their bound values, or with an SQL NULL, if not already bound.
* @param bool $expanded Whether to retrieve the expanded SQL. Passing TRUE is only supported as of libsqlite 3.14.
* @return string|false Returns the SQL of the prepared statement, or FALSE on failure.
* @since 7.4
*/
public function getSQL($expanded = false){}
}
/**

View File

@ -36,7 +36,7 @@
* </ul>
* @link https://secure.php.net/manual/en/password.constants.php
*/
define("PASSWORD_DEFAULT", 1);
define("PASSWORD_DEFAULT", '');
/**
* <p>
@ -75,7 +75,7 @@ define("PASSWORD_BCRYPT_DEFAULT_COST", 10);
* </li>
* </ul>
*/
define("PASSWORD_BCRYPT", 1);
define("PASSWORD_BCRYPT", '2y');
/**
*
@ -92,7 +92,7 @@ define("PASSWORD_BCRYPT", 1);
* Available as of PHP 7.2.0.
* @since 7.2
*/
define('PASSWORD_ARGON2I', 2);
define('PASSWORD_ARGON2I', 'argon2i');
/**
*
@ -109,7 +109,7 @@ define('PASSWORD_ARGON2I', 2);
* Available as of PHP 7.3.0.
* @since 7.3
*/
define('PASSWORD_ARGON2ID', 3);
define('PASSWORD_ARGON2ID', 'argon2id');
/**
* Default amount of memory in bytes that Argon2lib will use while trying to compute a hash.
@ -132,6 +132,11 @@ define ('PASSWORD_ARGON2_DEFAULT_TIME_COST', 4);
*/
define('PASSWORD_ARGON2_DEFAULT_THREADS', 1);
/**
* @since 7.4
*/
define('PASSWORD_ARGON2_PROVIDER', 'standard');
/**
* (PHP 5 &gt;= 5.5.0, PHP 5)<br/>
*
@ -200,4 +205,10 @@ function password_needs_rehash ($hash, $algo, $options = null) {}
*/
function password_verify ($password, $hash) {}
/**
* Return a complete list of all registered password hashing algorithms.
* @return string[]
* @since 7.4
*/
function password_algos(){}
// End of password v.

View File

@ -8,15 +8,13 @@ define ("ARRAY_FILTER_USE_KEY", 2);
/**
* Merge two or more arrays recursively
* @link https://php.net/manual/en/function.array-merge-recursive.php
* @param array $array1 <p>
* Initial array to merge.
* </p>
* @param array $_ [optional]
* @param array $_ [optional] Variable list of arrays to recursively merge.
* @return array An array of values resulted from merging the arguments together.
* @since 4.0.1
* @since 5.0
*/
function array_merge_recursive(array $array1, array $_ = null) { }
function array_merge_recursive(array $_ = null) { }
/**
* array_replace() replaces the values of the first array with the same values from all the following arrays.
@ -1192,4 +1190,14 @@ function realpath_cache_get() { }
*/
function realpath_cache_size() { }
/**
* It returns the same result as (array) $object, with the
* exception that it ignores overloaded array casts, such as used by
* ArrayObject.
* @param $obj
* @return array returns the mangled object properties
* @since 7.4
*/
function get_mangled_object_vars($obj){}
?>

View File

@ -1136,6 +1136,10 @@ define('PHP_MANDIR', '/usr/local/php/php/man');
*/
define('PHP_BINARY', '/usr/local/php/bin/php');
/**
* @since 7.4
*/
define('PHP_CLI_PROCESS_TITLE',1);
/** @link https://php.net/manual/en/outcontrol.constants.php */

View File

@ -45,9 +45,9 @@ function token_name ($token) {}
define('TOKEN_PARSE', 1);
define('T_REQUIRE_ONCE', 262);
define('T_REQUIRE', 261);
define('T_EVAL', 260);
define('T_INCLUDE_ONCE', 259);
define('T_INCLUDE', 258);
define('T_EVAL', 318);
define('T_INCLUDE_ONCE', 260);
define('T_INCLUDE', 259);
define('T_LOGICAL_OR', 263);
define('T_LOGICAL_XOR', 264);
define('T_LOGICAL_AND', 265);
@ -67,115 +67,125 @@ define('T_DIV_EQUAL', 273);
define('T_MUL_EQUAL', 272);
define('T_MINUS_EQUAL', 271);
define('T_PLUS_EQUAL', 270);
define('T_COALESCE', 282);
define('T_BOOLEAN_OR', 283);
define('T_BOOLEAN_AND', 284);
define('T_SPACESHIP', 289);
define('T_IS_NOT_IDENTICAL', 288);
define('T_IS_IDENTICAL', 287);
define('T_IS_NOT_EQUAL', 286);
define('T_IS_EQUAL', 285);
define('T_IS_GREATER_OR_EQUAL', 291);
define('T_IS_SMALLER_OR_EQUAL', 290);
define('T_SR', 293);
define('T_SL', 292);
define('T_INSTANCEOF', 294);
define('T_UNSET_CAST', 303);
define('T_BOOL_CAST', 302);
define('T_OBJECT_CAST', 301);
define('T_ARRAY_CAST', 300);
define('T_STRING_CAST', 299);
define('T_DOUBLE_CAST', 298);
define('T_INT_CAST', 297);
define('T_DEC', 296);
define('T_INC', 295);
define('T_POW', 304);
define('T_CLONE', 306);
define('T_NEW', 305);
define('T_ELSEIF', 308);
define('T_ELSE', 309);
define('T_ENDIF', 310);
define('T_PUBLIC', 316);
define('T_PROTECTED', 315);
define('T_PRIVATE', 314);
define('T_FINAL', 313);
define('T_ABSTRACT', 312);
define('T_STATIC', 311);
define('T_LNUMBER', 317);
define('T_DNUMBER', 318);
define('T_STRING', 319);
define('T_VARIABLE', 320);
define('T_INLINE_HTML', 321);
define('T_ENCAPSED_AND_WHITESPACE', 322);
define('T_CONSTANT_ENCAPSED_STRING', 323);
define('T_STRING_VARNAME', 324);
define('T_NUM_STRING', 325);
define('T_EXIT', 326);
define('T_IF', 327);
define('T_ECHO', 328);
define('T_DO', 329);
define('T_WHILE', 330);
define('T_ENDWHILE', 331);
define('T_FOR', 332);
define('T_ENDFOR', 333);
define('T_FOREACH', 334);
define('T_ENDFOREACH', 335);
define('T_DECLARE', 336);
define('T_ENDDECLARE', 337);
define('T_AS', 338);
define('T_SWITCH', 339);
define('T_ENDSWITCH', 340);
define('T_CASE', 341);
define('T_DEFAULT', 342);
define('T_BREAK', 343);
define('T_CONTINUE', 344);
define('T_GOTO', 345);
define('T_FUNCTION', 346);
define('T_CONST', 347);
define('T_RETURN', 348);
define('T_TRY', 349);
define('T_CATCH', 350);
define('T_FINALLY', 351);
define('T_THROW', 352);
define('T_USE', 353);
define('T_INSTEADOF', 354);
define('T_GLOBAL', 355);
define('T_VAR', 356);
define('T_UNSET', 357);
define('T_ISSET', 358);
define('T_EMPTY', 359);
define('T_HALT_COMPILER', 360);
define('T_CLASS', 361);
define('T_TRAIT', 362);
define('T_INTERFACE', 363);
define('T_EXTENDS', 364);
define('T_IMPLEMENTS', 365);
define('T_OBJECT_OPERATOR', 366);
define('T_LIST', 367);
define('T_ARRAY', 368);
define('T_CALLABLE', 369);
define('T_LINE', 370);
define('T_FILE', 371);
define('T_DIR', 372);
define('T_CLASS_C', 373);
define('T_TRAIT_C', 374);
define('T_METHOD_C', 375);
define('T_FUNC_C', 376);
define('T_COMMENT', 377);
define('T_DOC_COMMENT', 378);
define('T_OPEN_TAG', 379);
define('T_OPEN_TAG_WITH_ECHO', 380);
define('T_CLOSE_TAG', 381);
define('T_WHITESPACE', 382);
define('T_START_HEREDOC', 383);
define('T_END_HEREDOC', 384);
define('T_DOLLAR_OPEN_CURLY_BRACES', 385);
define('T_CURLY_OPEN', 386);
define('T_PAAMAYIM_NEKUDOTAYIM', 387);
define('T_NAMESPACE', 388);
define('T_NS_C', 389);
define('T_NS_SEPARATOR', 390);
define('T_ELLIPSIS', 391);
define('T_DOUBLE_COLON', 387);
/**
* @since 7.4
*/
define('T_COALESCE_EQUAL', 282);
define('T_COALESCE', 283);
define('T_BOOLEAN_OR', 284);
define('T_BOOLEAN_AND', 285);
define('T_SPACESHIP', 290);
define('T_IS_NOT_IDENTICAL', 289);
define('T_IS_IDENTICAL', 288);
define('T_IS_NOT_EQUAL', 287);
define('T_IS_EQUAL', 286);
define('T_IS_GREATER_OR_EQUAL', 292);
define('T_IS_SMALLER_OR_EQUAL', 291);
define('T_SR', 294);
define('T_SL', 293);
define('T_INSTANCEOF', 295);
define('T_UNSET_CAST', 302);
define('T_BOOL_CAST', 301);
define('T_OBJECT_CAST', 300);
define('T_ARRAY_CAST', 299);
define('T_STRING_CAST', 298);
define('T_DOUBLE_CAST', 297);
define('T_INT_CAST', 296);
define('T_DEC', 320);
define('T_INC', 319);
define('T_POW', 303);
define('T_CLONE', 305);
define('T_NEW', 304);
define('T_ELSEIF', 307);
define('T_ELSE', 308);
define('T_ENDIF', 323);
define('T_PUBLIC', 358);
define('T_PROTECTED', 357);
define('T_PRIVATE', 356);
define('T_FINAL', 355);
define('T_ABSTRACT', 354);
define('T_STATIC', 353);
define('T_LNUMBER', 309);
define('T_DNUMBER', 310);
define('T_STRING', 311);
define('T_VARIABLE', 312);
define('T_INLINE_HTML', 313);
define('T_ENCAPSED_AND_WHITESPACE', 314);
define('T_CONSTANT_ENCAPSED_STRING', 315);
define('T_STRING_VARNAME', 316);
define('T_NUM_STRING', 317);
define('T_EXIT', 321);
define('T_IF', 322);
define('T_ECHO', 324);
define('T_DO', 325);
define('T_WHILE', 326);
define('T_ENDWHILE', 327);
define('T_FOR', 328);
define('T_ENDFOR', 329);
define('T_FOREACH', 330);
define('T_ENDFOREACH', 331);
define('T_DECLARE', 332);
define('T_ENDDECLARE', 333);
define('T_AS', 334);
define('T_SWITCH', 335);
define('T_ENDSWITCH', 336);
define('T_CASE', 337);
define('T_DEFAULT', 338);
define('T_BREAK', 339);
define('T_CONTINUE', 340);
define('T_GOTO', 341);
define('T_FUNCTION', 342);
define('T_CONST', 344);
define('T_RETURN', 345);
define('T_TRY', 346);
define('T_CATCH', 347);
define('T_FINALLY', 348);
define('T_THROW', 349);
define('T_USE', 350);
define('T_INSTEADOF', 351);
define('T_GLOBAL', 352);
define('T_VAR', 359);
define('T_UNSET', 360);
define('T_ISSET', 361);
define('T_EMPTY', 362);
define('T_HALT_COMPILER', 363);
define('T_CLASS', 364);
define('T_TRAIT', 365);
define('T_INTERFACE', 366);
define('T_EXTENDS', 367);
define('T_IMPLEMENTS', 368);
define('T_OBJECT_OPERATOR', 369);
define('T_LIST', 370);
define('T_ARRAY', 371);
define('T_CALLABLE', 372);
define('T_LINE', 373);
define('T_FILE', 374);
define('T_DIR', 375);
define('T_CLASS_C', 376);
define('T_TRAIT_C', 377);
define('T_METHOD_C', 378);
define('T_FUNC_C', 379);
define('T_COMMENT', 380);
define('T_DOC_COMMENT', 381);
define('T_OPEN_TAG', 382);
define('T_OPEN_TAG_WITH_ECHO', 383);
define('T_CLOSE_TAG', 384);
define('T_WHITESPACE', 385);
define('T_START_HEREDOC', 386);
define('T_END_HEREDOC', 387);
define('T_DOLLAR_OPEN_CURLY_BRACES', 388);
define('T_CURLY_OPEN', 389);
define('T_PAAMAYIM_NEKUDOTAYIM', 390);
define('T_NAMESPACE', 391);
define('T_NS_C', 392);
define('T_NS_SEPARATOR', 393);
define('T_ELLIPSIS', 394);
define('T_DOUBLE_COLON', 390);
/**
* @since 7.4
*/
define('T_FN', 343);
define('T_BAD_CHARACTER', 395);
// End of tokenizer v.0.1