From ac879a1b675e381326d3f2a440b81af3c1a7a374 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Thu, 22 Jun 2023 17:45:06 +0200 Subject: [PATCH 01/73] Update random_int and random_bytes exception thrown --- random/random.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/random/random.php b/random/random.php index d4201eb78..c63c8e3dc 100644 --- a/random/random.php +++ b/random/random.php @@ -92,7 +92,7 @@ function getrandmax(): int {} * @param int $length The length of the random string that should be returned in bytes. * @return string Returns a string containing the requested number of cryptographically secure random bytes. * @since 7.0 - * @throws Exception if an appropriate source of randomness cannot be found. + * @throws Random\RandomException if an appropriate source of randomness cannot be found. */ function random_bytes(int $length): string {} @@ -103,7 +103,7 @@ function random_bytes(int $length): string {} * @param int $max The highest value to be returned, which must be less than or equal to PHP_INT_MAX. * @return int Returns a cryptographically secure random integer in the range min to max, inclusive. * @since 7.0 - * @throws Exception if an appropriate source of randomness cannot be found. + * @throws Random\RandomException if an appropriate source of randomness cannot be found. */ function random_int(int $min, int $max): int {} } From d26a67b21d57f22886a793b00f7c31ed02692477 Mon Sep 17 00:00:00 2001 From: Thomas Schulz Date: Tue, 18 Apr 2023 11:24:56 +0200 Subject: [PATCH 02/73] Added meta for Spoofchecker setChecks and setRestrictionLevel method arguments --- meta/.phpstorm.meta.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/.phpstorm.meta.php b/meta/.phpstorm.meta.php index ede319ab1..ed06f4cfa 100644 --- a/meta/.phpstorm.meta.php +++ b/meta/.phpstorm.meta.php @@ -627,6 +627,9 @@ function expectedReturnValues($functionReference, $values) { expectedReturnValues(\session_module_name(), argumentsSet('session_module_names')); expectedReturnValues(\session_status(), \PHP_SESSION_DISABLED, \PHP_SESSION_NONE, \PHP_SESSION_ACTIVE); + expectedArguments(\Spoofchecker::setChecks(), 0, \Spoofchecker::SINGLE_SCRIPT_CONFUSABLE | \Spoofchecker::MIXED_SCRIPT_CONFUSABLE | \Spoofchecker::WHOLE_SCRIPT_CONFUSABLE | \Spoofchecker::ANY_CASE | \Spoofchecker::SINGLE_SCRIPT | \Spoofchecker::INVISIBLE | \Spoofchecker::CHAR_LIMIT); + expectedArguments(\Spoofchecker::setRestrictionLevel(), 0, \Spoofchecker::ASCII, \Spoofchecker::HIGHLY_RESTRICTIVE, \Spoofchecker::MODERATELY_RESTRICTIVE, \Spoofchecker::MINIMALLY_RESTRICTIVE, \Spoofchecker::UNRESTRICTIVE, \Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE); + expectedArguments(\checkdnsrr(), 1, 'A', 'MX', 'NS', 'SOA', 'PTR', 'CNAME', 'AAAA', 'A6', 'SRV', 'NAPTR', 'TXT', 'ANY'); expectedArguments(\yaml_emit(), 1, YAML_ANY_ENCODING, YAML_UTF8_ENCODING, YAML_UTF16LE_ENCODING, YAML_UTF16BE_ENCODING); From 3dae7505cf51d570eb4e65f6501f678dbc7fffca Mon Sep 17 00:00:00 2001 From: Martin Herndl Date: Mon, 3 Jul 2023 20:40:25 +0200 Subject: [PATCH 03/73] Add throws PHPDoc to `constant()` --- standard/standard_0.php | 1 + 1 file changed, 1 insertion(+) diff --git a/standard/standard_0.php b/standard/standard_0.php index 62c05f4cb..df3fa0ec1 100644 --- a/standard/standard_0.php +++ b/standard/standard_0.php @@ -158,6 +158,7 @@ public function read(#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $d *

* @return mixed the value of the constant, or null if the constant is not * defined. + * @throws Error If the constant is not defined */ #[Pure(true)] function constant(string $name): mixed {} From 0b9854c8ba932966f3cb1469a2d18ab9249272b9 Mon Sep 17 00:00:00 2001 From: Martin Herndl Date: Mon, 3 Jul 2023 21:02:25 +0200 Subject: [PATCH 04/73] WI-72311: Update `constant()` return type description --- standard/standard_0.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/standard/standard_0.php b/standard/standard_0.php index df3fa0ec1..de46f9761 100644 --- a/standard/standard_0.php +++ b/standard/standard_0.php @@ -156,8 +156,7 @@ public function read(#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $d * @param string $name

* The constant name. *

- * @return mixed the value of the constant, or null if the constant is not - * defined. + * @return mixed the value of the constant. * @throws Error If the constant is not defined */ #[Pure(true)] From 57e00c6ffbe2d80c6a7d98aa52b9afb3362d3004 Mon Sep 17 00:00:00 2001 From: Artemy Pestretsov Date: Tue, 8 Aug 2023 16:39:20 +0200 Subject: [PATCH 05/73] WI-73605 Add #[Override] attribute --- Core/Core_c.php | 9 +++++++++ PhpStormStubsMap.php | 1 + 2 files changed, 10 insertions(+) diff --git a/Core/Core_c.php b/Core/Core_c.php index 696095752..8058f81bb 100644 --- a/Core/Core_c.php +++ b/Core/Core_c.php @@ -1124,3 +1124,12 @@ public function getValue(): mixed {} public function __debugInfo(): array {} } + +/** + * @since 8.3 + */ +#[Attribute(Attribute::TARGET_METHOD)] +final class Override +{ + public function __construct() {} +} diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index b61fa2b53..cd5a94c45 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -748,6 +748,7 @@ final class PhpStormStubsMap 'OutOfRangeException' => 'SPL/SPL.php', 'OuterIterator' => 'SPL/SPL.php', 'OverflowException' => 'SPL/SPL.php', + 'Override' => 'Core/Core_c.php', 'OwsrequestObj' => 'mapscript/mapscript.php', 'PDFlib' => 'pdflib/PDFlib.php', 'PDO' => 'PDO/PDO.php', From 515427c694d18132db86bb910a1828eab3699c63 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 14 Aug 2023 21:57:22 +0100 Subject: [PATCH 06/73] protocol_version was always an int property --- mysqli/mysqli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqli/mysqli.php b/mysqli/mysqli.php index b9dec2fa1..98068a61c 100644 --- a/mysqli/mysqli.php +++ b/mysqli/mysqli.php @@ -169,7 +169,7 @@ class mysqli public $sqlstate; /** - * @var string + * @var int */ #[LanguageLevelTypeAware(['8.1' => 'int'], default: '')] public $protocol_version; From 3e7eb717bda68cd04f0879f5d0e306c0605ff7f4 Mon Sep 17 00:00:00 2001 From: Jean-Luc Herren Date: Wed, 9 Aug 2023 14:08:17 +0200 Subject: [PATCH 07/73] Meta: Add missing session related ini values --- meta/.phpstorm.meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/.phpstorm.meta.php b/meta/.phpstorm.meta.php index ed06f4cfa..99575c37e 100644 --- a/meta/.phpstorm.meta.php +++ b/meta/.phpstorm.meta.php @@ -468,7 +468,7 @@ function argumentsSet($setName) { 'safe_mode', 'safe_mode_allowed_env_vars', 'safe_mode_exec_dir', 'safe_mode_gid', 'safe_mode_include_dir', 'safe_mode_protected_env_vars', 'sendmail_from', 'sendmail_path', 'serialize_precision', - 'session.auto_start', 'session.bug_compat_42', 'session.bug_compat_warn', 'session.cache_expire', 'session.cache_limiter', 'session.cookie_domain', 'session.cookie_httponly', 'session.cookie_lifetime', 'session.cookie_path', 'session.cookie_secure', 'session.entropy_file', 'session.entropy_length', 'session.gc_dividend', 'session.gc_divisor', 'session.gc_maxlifetime', 'session.gc_probability', 'session.hash_bits_per_character', 'session.hash_function', 'session.name', 'session.referer_check', 'session.save_handler', 'session.save_path', 'session.serialize_handler', 'session.use_cookies', 'session.use_only_cookies', 'session.use_trans_sid', + 'session.auto_start', 'session.bug_compat_42', 'session.bug_compat_warn', 'session.cache_expire', 'session.cache_limiter', 'session.cookie_domain', 'session.cookie_httponly', 'session.cookie_lifetime', 'session.cookie_path', 'session.cookie_secure', 'session.cookie_samesite', 'session.entropy_file', 'session.entropy_length', 'session.gc_dividend', 'session.gc_divisor', 'session.gc_maxlifetime', 'session.gc_probability', 'session.hash_bits_per_character', 'session.hash_function', 'session.name', 'session.referer_check', 'session.save_handler', 'session.save_path', 'session.serialize_handler', 'session.use_cookies', 'session.use_only_cookies', 'session.use_trans_sid', 'session.lazy_write', 'session.sid_bits_per_character', 'session.sid_length', 'session.trans_sid_hosts', 'session.trans_sid_tags', 'session.upload_progress.enabled', 'session.upload_progress.cleanup', 'session.upload_progress.prefix', 'session.upload_progress.name', 'session.upload_progress.freq', 'session.upload_progress.min_freq', 'session.use_strict_mode', 'session_pgsql.create_table', 'session_pgsql.db', 'session_pgsql.disable', 'session_pgsql.failover_mode', 'session_pgsql.gc_interval', 'session_pgsql.keep_expired', 'session_pgsql.sem_file_name', 'session_pgsql.serializable', 'session_pgsql.short_circuit', 'session_pgsql.use_app_vars', 'session_pgsql.vacuum_interval', 'short_open_tag', 'simple_cvs.authMethod', 'simple_cvs.compressionLevel', 'simple_cvs.cvsRoot', 'simple_cvs.host', 'simple_cvs.moduleName', 'simple_cvs.userName', 'simple_cvs.workingDir', From d4212d6519b3f1ff5d0f96fec422851c0e41492f Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 16 Aug 2023 22:11:52 +0200 Subject: [PATCH 08/73] Mark compareDocumentPosition as removed since 8.0 This was never implemented in PHP, and got removed as a consequence in PHP 8.0. This might be introduced later, but for now the stubs shouldn't contain a method that isn't there. --- dom/dom_c.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dom/dom_c.php b/dom/dom_c.php index 9622a4ef6..96318e0e4 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -254,6 +254,7 @@ public function hasAttributes(): bool {} /** * @param DOMNode $other + * @removed 8.0 */ public function compareDocumentPosition(DOMNode $other) {} From c9fda7c71636a795484a6142c00004c45fa49331 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Tue, 11 Jul 2023 16:14:13 +0800 Subject: [PATCH 09/73] Parameter and return of `DOMNode::lookupNamespaceURI` are both nullable --- dom/dom_c.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/dom_c.php b/dom/dom_c.php index 96318e0e4..4bf64209f 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -298,7 +298,7 @@ public function isDefaultNamespace(#[LanguageLevelTypeAware(['8.0' => 'string'], * @param string|null $prefix

* The prefix of the namespace. *

- * @return string The namespace URI of the node. + * @return string|null The namespace URI of the node. */ #[PhpStormStubsElementAvailable(from: '8.0')] #[TentativeType] @@ -307,10 +307,10 @@ public function lookupNamespaceURI(?string $prefix): ?string {} /** * Gets the namespace URI of the node based on the prefix * @link https://php.net/manual/en/domnode.lookupnamespaceuri.php - * @param string $prefix

+ * @param string|null $prefix

* The prefix of the namespace. *

- * @return string The namespace URI of the node. + * @return string|null The namespace URI of the node. */ #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] public function lookupNamespaceUri($prefix) {} From 71588c847f5aba549289b48ba8619027cc268540 Mon Sep 17 00:00:00 2001 From: Thomas Schulz Date: Tue, 6 Jun 2023 12:14:01 +0200 Subject: [PATCH 10/73] idate and gmdate functions: added descriptions for $timestamp parameter --- date/date.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/date/date.php b/date/date.php index 36e1766ec..7e328bacf 100644 --- a/date/date.php +++ b/date/date.php @@ -382,7 +382,8 @@ function date(string $format, ?int $timestamp) {} * * *

- * @param int|null $timestamp [optional] + * @param int|null $timestamp [optional] Default value: time(). The optional timestamp parameter is an integer Unix timestamp + * that defaults to the current local time if a timestamp is not given. * @return int|false an integer. *

* As idate always returns an integer and @@ -400,7 +401,8 @@ function idate(string $format, ?int $timestamp): int|false {} * The format of the outputted date string. See the formatting * options for the date function. *

- * @param int|null $timestamp [optional] + * @param int|null $timestamp [optional] Default value: time(). The optional timestamp parameter is an integer Unix timestamp + * that defaults to the current local time if a timestamp is not given. * @return string|false a formatted date string. If a non-numeric value is used for * timestamp, false is returned and an * E_WARNING level error is emitted. From 4f769af59f2ba8137965c1784192dbd4c9ac44b6 Mon Sep 17 00:00:00 2001 From: Tim Bond Date: Mon, 29 May 2023 16:00:36 -0700 Subject: [PATCH 11/73] GD: Add docs for font param to imagestring --- gd/gd.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gd/gd.php b/gd/gd.php index 08537aeb2..3e9ee1114 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -1445,7 +1445,9 @@ function imagesetpixel(GdImage $image, int $x, int $y, int $color): bool {} * Draw a string horizontally * @link https://php.net/manual/en/function.imagestring.php * @param resource|GdImage $image - * @param int $font + * @param int $font

+ * Can be 1, 2, 3, 4, 5 for built-in fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or (since 8.1) GdFont instance + *

* @param int $x

* x-coordinate of the upper left corner. *

From df7d6e1ea32ec849b0b35eeb47fad13dcbe6047b Mon Sep 17 00:00:00 2001 From: Muqsit Date: Mon, 29 May 2023 15:03:55 +0000 Subject: [PATCH 12/73] Fix return type of SplMinHeap::insert(): void -> true --- SPL/SPL_c1.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPL/SPL_c1.php b/SPL/SPL_c1.php index 010b8dcda..2498758e1 100644 --- a/SPL/SPL_c1.php +++ b/SPL/SPL_c1.php @@ -1531,7 +1531,7 @@ public function extract() {} * @param TValue $value

* The value to insert. *

- * @return void + * @return true */ public function insert($value) {} From 6d1accb78b0e67e4d4196a48d5c79535f555d84e Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Sun, 11 Jun 2023 22:47:14 +0300 Subject: [PATCH 13/73] Added PhpStormStubsMap::DIR constant to simplify integration --- PhpStormStubsMap.php | 2 ++ tests/Tools/generate-stub-map | 2 ++ 2 files changed, 4 insertions(+) diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index cd5a94c45..1d5d1597d 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -9,6 +9,8 @@ */ final class PhpStormStubsMap { +const DIR = __DIR__; + const CLASSES = array ( 'AMQPBasicProperties' => 'amqp/amqp.php', 'AMQPChannel' => 'amqp/amqp.php', diff --git a/tests/Tools/generate-stub-map b/tests/Tools/generate-stub-map index c1e406d46..e3a528233 100644 --- a/tests/Tools/generate-stub-map +++ b/tests/Tools/generate-stub-map @@ -271,6 +271,8 @@ namespace JetBrains\PHPStormStub; */ final class PhpStormStubsMap { +const DIR = __DIR__; + const CLASSES = {$exportedClasses}; const FUNCTIONS = {$exportedFunctions}; From 31d97be3dd36cda1097fb5ee78ac07d939ac0285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Tue, 9 May 2023 09:56:03 -0700 Subject: [PATCH 14/73] sync with Relay v0.6.4 --- relay/Relay.php | 82 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/relay/Relay.php b/relay/Relay.php index 2cca4c6a5..184b5d908 100644 --- a/relay/Relay.php +++ b/relay/Relay.php @@ -108,6 +108,16 @@ class Relay */ public const MULTI = 0x01; + /** + * Integer representing we're SUBSCRIBED. Note that this constant can + * only really be accessed when `true` is passed to `getMask()` telling + * relay to return the complete bitmasked mode. + * + * @see \Relay\Relay::getMode() + * @var int + **/ + public const SUBSCRIBED = 0x04; + /** * Integer representing the prefix option. * @@ -801,9 +811,12 @@ public static function license(): array {} * - `stats.empty`: How many times we've run out of free requests (indicating the size of the ring buffers should be increased) * - `stats.oom`: The number of times we've run out of memory * - `stats.ops_per_sec`: The number of commands processed per second - * - `stats.walltime`: The number of microseconds Relay has spent doing work * - `stats.bytes_sent`: The number of bytes Relay has written to the network * - `stats.bytes_received`: The number of bytes Relay has read from the network + * - `stats.command_usec`: The number of microseconds Relay has spent executing commands + * - `stats.rinit_usec`: The number of microseconds Relay has spent in request initialization. + * - `stats.rshutdown_usec`: The number of microseconds Relay has spent in request shutdown. + * - `stats.sigio_usec`: The number of microseconds Relay has spent in its SIGIO handler. * * - `memory.total`: The total bytes of allocated memory * - `memory.limit`: The capped number of bytes Relay has available to use @@ -1564,6 +1577,16 @@ public function psetex(mixed $key, int $milliseconds, mixed $value): Relay|bool #[\Relay\Attributes\RedisCommand] public function publish(string $channel, string $message): Relay|int|false {} + /** + * Posts a message to the given shard channel. + * + * @param string $channel + * @param string $message + * @return Relay|int|false + */ + #[\Relay\Attributes\RedisCommand] + public function spublish(string $channel, string $message): Relay|int|false {} + /** * Set key to hold string value if key does not exist. In that case, it is equal to SET. * When key already holds a value, no operation is performed. @@ -2314,6 +2337,63 @@ public function sunion(mixed $key, mixed ...$other_keys): Relay|array|false {} #[\Relay\Attributes\RedisCommand] public function sunionstore(mixed $key, mixed ...$other_keys): Relay|int|false {} + /** + * Subscribes to the specified channels. + * + * @param array $channels + * @param callable $callback + * @return bool + */ + #[\Relay\Attributes\RedisCommand] + public function subscribe(array $channels, callable $callback): bool {} + + /** + * Unsubscribes from the given channels, or from all of them if none is given. + * + * @param array $channels + * @return bool + */ + #[\Relay\Attributes\RedisCommand] + public function unsubscribe(array $channels = []): bool {} + + /** + * Subscribes to the given patterns. + * + * @param array $patterns + * @param callable $callback + * @return bool + */ + #[\Relay\Attributes\RedisCommand] + public function psubscribe(array $patterns, callable $callback): bool {} + + /** + * Unsubscribes from the given patterns, or from all of them if none is given. + * + * @param array $patterns + * @return bool + */ + #[\Relay\Attributes\RedisCommand] + public function punsubscribe(array $patterns = []): bool {} + + /** + * Subscribes to the specified shard channels. + * + * @param array $channels + * @param callable $callback + * @return bool + */ + #[\Relay\Attributes\RedisCommand] + public function ssubscribe(array $channels, callable $callback): bool {} + + /** + * Unsubscribes from the given shard channels, or from all of them if none is given. + * + * @param array $channels + * @return bool + */ + #[\Relay\Attributes\RedisCommand] + public function sunsubscribe(array $channels = []): bool {} + /** * Alters the last access time of a key(s). * From bbf438503eaec39d901fb589a74979ff456fd470 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Fri, 18 Aug 2023 12:21:22 +0200 Subject: [PATCH 15/73] [phpstorm-stubs] Tried to fix tests that used to fail for PHP 8.1 and PHP 8.2. Updated constants, changed return type for WeakMap::getIterator in PHPDoc and added one more parameter to function hash_pbkdf2(). --- Core/Core_c.php | 2 +- curl/curl_d.php | 2 +- hash/hash.php | 13 ++++++++++++- pgsql/pgsql.php | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Core/Core_c.php b/Core/Core_c.php index 8058f81bb..a297b74b3 100644 --- a/Core/Core_c.php +++ b/Core/Core_c.php @@ -795,7 +795,7 @@ public function offsetUnset($object): void {} /** * Returns an iterator in the "[object => mixed]" format. * - * @return Traversable + * @return Iterator */ public function getIterator(): Iterator {} diff --git a/curl/curl_d.php b/curl/curl_d.php index 233e564bc..22ed96f49 100644 --- a/curl/curl_d.php +++ b/curl/curl_d.php @@ -2973,7 +2973,7 @@ /** * @link https://php.net/manual/en/curl.constants.php */ -define("CURLINFO_LASTONE", 62); +define("CURLINFO_LASTONE", 64); /** * An easy handle already added to a multi handle was attempted to get added a second time. * @link https://www.php.net/manual/en/function.curl-multi-exec.php diff --git a/hash/hash.php b/hash/hash.php index 27e87e4dd..f6e9edf6a 100644 --- a/hash/hash.php +++ b/hash/hash.php @@ -280,13 +280,24 @@ function hash_hmac_algos(): array {} * @param bool $binary [optional]

* When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. *

+ * @param array $options [optional]

+ * Additional options. This parameter was added for PHP 8.1 only. + *

* @return string a string containing the derived key as lowercase hexits unless * raw_output is set to TRUE in which case the raw * binary representation of the derived key is returned. * @since 5.5 */ #[Pure] -function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string {} +function hash_pbkdf2( + string $algo, + string $password, + string $salt, + int $iterations, + int $length = 0, + bool $binary = false, + #[PhpStormStubsElementAvailable('8.1')] array $options = [] +): string {} /** * Generates a key diff --git a/pgsql/pgsql.php b/pgsql/pgsql.php index 91f899c0a..c28309a13 100644 --- a/pgsql/pgsql.php +++ b/pgsql/pgsql.php @@ -2066,8 +2066,8 @@ function pg_consume_input(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'] */ function pg_flush(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): int|bool {} -define('PGSQL_LIBPQ_VERSION', "15.3"); -define('PGSQL_LIBPQ_VERSION_STR', "15.3"); +define('PGSQL_LIBPQ_VERSION', "15.4"); +define('PGSQL_LIBPQ_VERSION_STR', "15.4"); /** * Passed to pg_connect to force the creation of a new connection, From 07ab12d8b1d953ad45c70fc1279b4f57308fef62 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Fri, 18 Aug 2023 12:56:56 +0200 Subject: [PATCH 16/73] [phpstorm-stubs] Added to return type in PHPDoc for WeakMap::getIterator() and changed PHP versions interval for parameter in function hash_pbkdf2(). --- Core/Core_c.php | 2 +- hash/hash.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Core_c.php b/Core/Core_c.php index a297b74b3..37c779d17 100644 --- a/Core/Core_c.php +++ b/Core/Core_c.php @@ -795,7 +795,7 @@ public function offsetUnset($object): void {} /** * Returns an iterator in the "[object => mixed]" format. * - * @return Iterator + * @return Iterator */ public function getIterator(): Iterator {} diff --git a/hash/hash.php b/hash/hash.php index f6e9edf6a..923bd6744 100644 --- a/hash/hash.php +++ b/hash/hash.php @@ -296,7 +296,7 @@ function hash_pbkdf2( int $iterations, int $length = 0, bool $binary = false, - #[PhpStormStubsElementAvailable('8.1')] array $options = [] + #[PhpStormStubsElementAvailable(from: '8.1', to: '8.1')] array $options = [] ): string {} /** From e053fc3efc54652abb8d158346d8d07bbabbb1dc Mon Sep 17 00:00:00 2001 From: szutoutou Date: Thu, 13 Jul 2023 18:24:53 +0800 Subject: [PATCH 17/73] Fix RedisCluster::hSet parameter $value type --- redis/RedisCluster.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/RedisCluster.php b/redis/RedisCluster.php index 3fb316e14..6d2b30649 100644 --- a/redis/RedisCluster.php +++ b/redis/RedisCluster.php @@ -1538,7 +1538,7 @@ public function hIncrBy($key, $hashKey, $value) {} * * @param string $key * @param string $hashKey - * @param string $value + * @param mixed $value * * @return int * 1 if value didn't exist and was added successfully, From 47bb35c2d474304438938bcbd4588ab48703cd4c Mon Sep 17 00:00:00 2001 From: szutoutou Date: Wed, 19 Jul 2023 14:36:38 +0800 Subject: [PATCH 18/73] Update RedisCluster.php --- redis/RedisCluster.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/RedisCluster.php b/redis/RedisCluster.php index 6d2b30649..802c6e203 100644 --- a/redis/RedisCluster.php +++ b/redis/RedisCluster.php @@ -246,7 +246,7 @@ public function del($key1, ...$otherKeys) {} * * @param string $key * @param int $ttl - * @param string $value + * @param mix $value * * @return bool TRUE if the command is successful. * @link https://redis.io/commands/setex From b1d570dd8ec1b68c56a8f093718c3c63436ba504 Mon Sep 17 00:00:00 2001 From: szutoutou Date: Fri, 18 Aug 2023 09:32:12 +0800 Subject: [PATCH 19/73] Update RedisCluster.php --- redis/RedisCluster.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/RedisCluster.php b/redis/RedisCluster.php index 802c6e203..cec978cd6 100644 --- a/redis/RedisCluster.php +++ b/redis/RedisCluster.php @@ -246,7 +246,7 @@ public function del($key1, ...$otherKeys) {} * * @param string $key * @param int $ttl - * @param mix $value + * @param mixed $value * * @return bool TRUE if the command is successful. * @link https://redis.io/commands/setex From 760c5f908d92159f8b1586f060d5b942b3dd1057 Mon Sep 17 00:00:00 2001 From: Michael Strelan Date: Thu, 8 Jun 2023 13:18:22 +1000 Subject: [PATCH 20/73] Update RedisCluster constructor --- redis/RedisCluster.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/redis/RedisCluster.php b/redis/RedisCluster.php index cec978cd6..f52688865 100644 --- a/redis/RedisCluster.php +++ b/redis/RedisCluster.php @@ -78,10 +78,11 @@ class RedisCluster * * @param string|null $name * @param array $seeds - * @param float $timeout - * @param float $readTimeout + * @param int|float $timeout + * @param int|float $readTimeout * @param bool $persistent - * @param string|null $auth + * @param mixed $auth + * @param array $context * @throws RedisClusterException * * @example @@ -105,7 +106,7 @@ class RedisCluster * $redisClusterDev = new RedisCluster('test'); * */ - public function __construct($name, $seeds, $timeout = null, $readTimeout = null, $persistent = false, $auth = null) {} + public function __construct($name, $seeds, $timeout = null, $readTimeout = null, $persistent = false, $auth = null, $context = null) {} /** * Disconnects from the RedisCluster instance, except when pconnect is used. From 2cd46df17a943152fb996df9ca71aceff40688ea Mon Sep 17 00:00:00 2001 From: Michael Strelan Date: Fri, 18 Aug 2023 08:34:42 +1000 Subject: [PATCH 21/73] Update to match upstream --- redis/RedisCluster.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis/RedisCluster.php b/redis/RedisCluster.php index f52688865..5eee15f8a 100644 --- a/redis/RedisCluster.php +++ b/redis/RedisCluster.php @@ -77,12 +77,12 @@ class RedisCluster * Creates a Redis Cluster client * * @param string|null $name - * @param array $seeds + * @param array|null $seeds * @param int|float $timeout * @param int|float $readTimeout * @param bool $persistent * @param mixed $auth - * @param array $context + * @param array|null $context * @throws RedisClusterException * * @example @@ -106,7 +106,7 @@ class RedisCluster * $redisClusterDev = new RedisCluster('test'); * */ - public function __construct($name, $seeds, $timeout = null, $readTimeout = null, $persistent = false, $auth = null, $context = null) {} + public function __construct($name, $seeds = null, $timeout = null, $readTimeout = null, $persistent = false, $auth = null, $context = null) {} /** * Disconnects from the RedisCluster instance, except when pconnect is used. From 999f85d061ad500aa542350b39c6bf6963f29be4 Mon Sep 17 00:00:00 2001 From: David Kmenta Date: Mon, 24 Apr 2023 14:21:32 +0200 Subject: [PATCH 22/73] Fix Imagick::scaleImage parameter name According to https://github.com/php/doc-en/pull/2444 --- imagick/imagick.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imagick/imagick.php b/imagick/imagick.php index 4c0d5a699..af8db68c1 100644 --- a/imagick/imagick.php +++ b/imagick/imagick.php @@ -1951,7 +1951,7 @@ public function setImageFormat($format) {} * If legacy is true, the calculations are done with the small rounding bug that existed in Imagick before 3.4.0.
* If false, the calculations should produce the same results as ImageMagick CLI does. * @link https://php.net/manual/en/imagick.scaleimage.php - * @param int $cols + * @param int $columns * @param int $rows * @param bool $bestfit [optional] The behavior of the parameter bestfit changed in Imagick 3.0.0. Before this version given dimensions 400x400 an image of dimensions 200x150 would be left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as this is the "best fit" for the given dimensions. If bestfit parameter is used both width and height must be given. * @param bool $legacy [optional] Added since 3.4.0. Default value FALSE @@ -1959,7 +1959,7 @@ public function setImageFormat($format) {} * @throws ImagickException Throws ImagickException on error * @since 2.0.0 */ - public function scaleImage($cols, $rows, $bestfit = false, $legacy = false) {} + public function scaleImage($columns, $rows, $bestfit = false, $legacy = false) {} /** * (PECL imagick 0.9.0-0.9.9)
From 1f3696c6951c58395bf70e985256255e901767e9 Mon Sep 17 00:00:00 2001 From: Lars Moelleken Date: Fri, 21 Jul 2023 07:41:15 +0200 Subject: [PATCH 23/73] curl_multi_init: fix return description ref.: https://github.com/php/doc-en/pull/2591 --- curl/curl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curl/curl.php b/curl/curl.php index c3b7db346..346f77a6f 100644 --- a/curl/curl.php +++ b/curl/curl.php @@ -2594,7 +2594,7 @@ function curl_close(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: ' /** * Returns a new cURL multi handle * @link https://php.net/manual/en/function.curl-multi-init.php - * @return resource|CurlMultiHandle|false a cURL multi handle resource on success, false on failure. + * @return resource|CurlMultiHandle a cURL multi handle resource or object depends on the php version */ #[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] function curl_multi_init(): CurlMultiHandle {} From 1be6a79e4592d8e21fb7a8a3b19dd5aedaf57b8d Mon Sep 17 00:00:00 2001 From: Mustafa UZUN Date: Sun, 20 Aug 2023 21:41:08 +0300 Subject: [PATCH 24/73] fix: include typo --- meta/.phpstorm.meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/.phpstorm.meta.php b/meta/.phpstorm.meta.php index 99575c37e..f2218004d 100644 --- a/meta/.phpstorm.meta.php +++ b/meta/.phpstorm.meta.php @@ -172,7 +172,7 @@ function argumentsSet($setName) { expectedArguments(\Event::pending(), 0, \Event::READ|\Event::WRITE|\Event::TIMEOUT|\Event::SIGNAL); expectedArguments(\EventBase::loop(), 0, \EventBase::LOOP_ONCE, \EventBase::LOOP_NONBLOCK, \EventBase::NOLOCK, \EventBase::STARTUP_IOCP, \EventBase::NO_CACHE_TIME, \EventBase::EPOLL_USE_CHANGELIST); - expectedArguments(\extension_loaded(), 0, 'amqp', 'apache', 'apc', 'apd', 'bbcode', 'bcmath', 'bcompiler', 'bz2', 'cairo', 'calendar', 'chdb', 'classkit', 'com', 'crack', 'ctype', 'cubrid', 'curl', 'cyrus', 'dba', 'dbase', 'dbplus', 'dbx', 'dio', 'dom', 'dotnet', 'eio', 'enchant', 'ev', 'event', 'exif', 'expect', 'fam', 'fbsql', 'fdf', 'fileinfo', 'filepro', 'filter', 'fribidi', 'ftp', 'gearman', 'gender', 'geoip', 'gettext', 'gmagick', 'gmp', 'gnupg', 'gupnp', 'haru', 'htscanner', 'pecl_http', 'hyperwave', 'hwapi', 'interbase', 'ibm_db2', 'iconv', 'id3', 'informix', 'iisfunc', 'gd', 'imagick', 'imap', 'inclued', 'ingres', 'inotify', 'intl', 'java', 'json', 'judy', 'kadm5', 'ktaglib', 'lapack', 'ldap', 'libevent', 'libxml', 'lua', 'lzf', 'mailparse', 'maxdb', 'mbstring', 'mcrypt', 'mcve', 'memcache', 'memcached', 'memtrack', 'mhash', 'ming', 'mnogosearch', 'mongo', 'mqseries', 'msession', 'msql', 'mssql', 'mysql', 'mysqli', 'mysqlnd', 'mysqlnd_memcache', 'mysqlnd_ms', 'mysqlnd_mux', 'mysqlnd_qc', 'mysqlnd_uh', 'ncurses', 'net_gopher', 'newt', 'notes', 'nsapi', 'oauth', 'oci8', 'oggvorbis', 'openal', 'openssl', 'ovrimos', 'paradox', 'parsekit', 'pcntl', 'pcre', 'pdflib', 'pdo', 'pdo_4d', 'pdo_cubrid', 'pdo_dblib', 'pdo_firebird', 'pdo_ibm', 'pdo_informix', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 'pdo_sqlsrv', 'pdo_pgsql', 'phar', 'posix', 'printer', 'proctitle', 'ps', 'pspell', 'pthreads', 'qtdom', 'quickhash', 'radius', 'rar', 'readline', 'recode', 'rpmreader', 'rrd', 'runkit', 'sam', 'sca', 'scream', 'sca_sdo', 'sysvmsg', 'session', 'session_pgsql', 'shmop', 'simplexml', 'snmp', 'soap', 'sockets', 'solr', 'sphinx', 'spl_types', 'spplus', 'sqlite', 'sqlite3', 'sqlsrv', 'ssdeep', 'ssh2', 'stats', 'stomp', 'svm', 'svn', 'swf', 'swish', 'sybase', 'taint', 'tcpwrap', 'tidy', 'tokenizer', 'tokyo_tyrant', 'trader', 'odbc', 'v8js', 'varnish', 'vpopmail', 'w32api', 'wddx', 'weakref', 'win32ps', 'win32service', 'wincache', 'xattr', 'xdiff', 'xhprof', 'xml', 'xmlreader', 'xmlrpc', 'xmlwriter', 'xsl', 'xslt', 'yaf', 'yaml', 'yaz', 'zip', 'zlib'); + expectedArguments(\extension_loaded(), 0, 'amqp', 'apache', 'apc', 'apd', 'bbcode', 'bcmath', 'bcompiler', 'bz2', 'cairo', 'calendar', 'chdb', 'classkit', 'com', 'crack', 'ctype', 'cubrid', 'curl', 'cyrus', 'dba', 'dbase', 'dbplus', 'dbx', 'dio', 'dom', 'dotnet', 'eio', 'enchant', 'ev', 'event', 'exif', 'expect', 'fam', 'fbsql', 'fdf', 'fileinfo', 'filepro', 'filter', 'fribidi', 'ftp', 'gearman', 'gender', 'geoip', 'gettext', 'gmagick', 'gmp', 'gnupg', 'gupnp', 'haru', 'htscanner', 'pecl_http', 'hyperwave', 'hwapi', 'interbase', 'ibm_db2', 'iconv', 'id3', 'informix', 'iisfunc', 'gd', 'imagick', 'imap', 'include', 'ingres', 'inotify', 'intl', 'java', 'json', 'judy', 'kadm5', 'ktaglib', 'lapack', 'ldap', 'libevent', 'libxml', 'lua', 'lzf', 'mailparse', 'maxdb', 'mbstring', 'mcrypt', 'mcve', 'memcache', 'memcached', 'memtrack', 'mhash', 'ming', 'mnogosearch', 'mongo', 'mqseries', 'msession', 'msql', 'mssql', 'mysql', 'mysqli', 'mysqlnd', 'mysqlnd_memcache', 'mysqlnd_ms', 'mysqlnd_mux', 'mysqlnd_qc', 'mysqlnd_uh', 'ncurses', 'net_gopher', 'newt', 'notes', 'nsapi', 'oauth', 'oci8', 'oggvorbis', 'openal', 'openssl', 'ovrimos', 'paradox', 'parsekit', 'pcntl', 'pcre', 'pdflib', 'pdo', 'pdo_4d', 'pdo_cubrid', 'pdo_dblib', 'pdo_firebird', 'pdo_ibm', 'pdo_informix', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 'pdo_sqlsrv', 'pdo_pgsql', 'phar', 'posix', 'printer', 'proctitle', 'ps', 'pspell', 'pthreads', 'qtdom', 'quickhash', 'radius', 'rar', 'readline', 'recode', 'rpmreader', 'rrd', 'runkit', 'sam', 'sca', 'scream', 'sca_sdo', 'sysvmsg', 'session', 'session_pgsql', 'shmop', 'simplexml', 'snmp', 'soap', 'sockets', 'solr', 'sphinx', 'spl_types', 'spplus', 'sqlite', 'sqlite3', 'sqlsrv', 'ssdeep', 'ssh2', 'stats', 'stomp', 'svm', 'svn', 'swf', 'swish', 'sybase', 'taint', 'tcpwrap', 'tidy', 'tokenizer', 'tokyo_tyrant', 'trader', 'odbc', 'v8js', 'varnish', 'vpopmail', 'w32api', 'wddx', 'weakref', 'win32ps', 'win32service', 'wincache', 'xattr', 'xdiff', 'xhprof', 'xml', 'xmlreader', 'xmlrpc', 'xmlwriter', 'xsl', 'xslt', 'yaf', 'yaml', 'yaz', 'zip', 'zlib'); registerArgumentsSet('error_levels', E_ALL|E_ERROR|E_WARNING|E_PARSE|E_NOTICE|E_STRICT|E_RECOVERABLE_ERROR|E_DEPRECATED|E_CORE_ERROR|E_CORE_WARNING|E_COMPILE_ERROR|E_COMPILE_WARNING|E_USER_ERROR|E_USER_WARNING|E_USER_NOTICE|E_USER_DEPRECATED); expectedArguments(\error_reporting(), 0, argumentsSet('error_levels')); From 8bd70a80ddddba3f52aa88841c6635c48201d9e9 Mon Sep 17 00:00:00 2001 From: Mustafa UZUN Date: Sun, 20 Aug 2023 21:44:43 +0300 Subject: [PATCH 25/73] fix: other include typos --- meta/.phpstorm.meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/.phpstorm.meta.php b/meta/.phpstorm.meta.php index f2218004d..63a56fe32 100644 --- a/meta/.phpstorm.meta.php +++ b/meta/.phpstorm.meta.php @@ -617,7 +617,7 @@ function expectedReturnValues($functionReference, $values) { expectedArguments(\pg_select(), 4, argumentsSet('pgResultTypes')); expectedReturnValues(\php_sapi_name(), 'aolserver', 'apache', 'apache2filter', 'apache2handler', 'caudium', 'cgi-fcgi', 'cli', 'cli-server', 'continuity', 'embed', 'fpm-fcgi', 'isapi', 'litespeed', 'milter', 'nsapi', 'phpdbg', 'phttpd', 'pi3web', 'roxen', 'thttpd', 'tux', 'webjames'); - expectedArguments(\phpversion(), 0, 'amqp', 'apache', 'apc', 'apd', 'bbcode', 'bcmath', 'bcompiler', 'bz2', 'cairo', 'calendar', 'chdb', 'classkit', 'com', 'crack', 'ctype', 'cubrid', 'curl', 'cyrus', 'dba', 'dbase', 'dbplus', 'dbx', 'dio', 'dom', 'dotnet', 'eio', 'enchant', 'ev', 'event', 'exif', 'expect', 'fam', 'fbsql', 'fdf', 'fileinfo', 'filepro', 'filter', 'fribidi', 'ftp', 'gearman', 'gender', 'geoip', 'gettext', 'gmagick', 'gmp', 'gnupg', 'gupnp', 'haru', 'htscanner', 'pecl_http', 'hyperwave', 'hwapi', 'interbase', 'ibm_db2', 'iconv', 'id3', 'informix', 'iisfunc', 'gd', 'imagick', 'imap', 'inclued', 'ingres', 'inotify', 'intl', 'java', 'json', 'judy', 'kadm5', 'ktaglib', 'lapack', 'ldap', 'libevent', 'libxml', 'lua', 'lzf', 'mailparse', 'maxdb', 'mbstring', 'mcrypt', 'mcve', 'memcache', 'memcached', 'memtrack', 'mhash', 'ming', 'mnogosearch', 'mongo', 'mqseries', 'msession', 'msql', 'mssql', 'mysql', 'mysqli', 'mysqlnd', 'mysqlnd_memcache', 'mysqlnd_ms', 'mysqlnd_mux', 'mysqlnd_qc', 'mysqlnd_uh', 'ncurses', 'net_gopher', 'newt', 'notes', 'nsapi', 'oauth', 'oci8', 'oggvorbis', 'openal', 'openssl', 'ovrimos', 'paradox', 'parsekit', 'pcntl', 'pcre', 'pdflib', 'pdo', 'pdo_4d', 'pdo_cubrid', 'pdo_dblib', 'pdo_firebird', 'pdo_ibm', 'pdo_informix', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 'pdo_sqlsrv', 'pdo_pgsql', 'phar', 'posix', 'printer', 'proctitle', 'ps', 'pspell', 'pthreads', 'qtdom', 'quickhash', 'radius', 'rar', 'readline', 'recode', 'rpmreader', 'rrd', 'runkit', 'sam', 'sca', 'scream', 'sca_sdo', 'sysvmsg', 'session', 'session_pgsql', 'shmop', 'simplexml', 'snmp', 'soap', 'sockets', 'solr', 'sphinx', 'spl_types', 'spplus', 'sqlite', 'sqlite3', 'sqlsrv', 'ssdeep', 'ssh2', 'stats', 'stomp', 'svm', 'svn', 'swf', 'swish', 'sybase', 'taint', 'tcpwrap', 'tidy', 'tokenizer', 'tokyo_tyrant', 'trader', 'odbc', 'v8js', 'varnish', 'vpopmail', 'w32api', 'wddx', 'weakref', 'win32ps', 'win32service', 'wincache', 'xattr', 'xdiff', 'xhprof', 'xml', 'xmlreader', 'xmlrpc', 'xmlwriter', 'xsl', 'xslt', 'yaf', 'yaml', 'yaz', 'zip', 'zlib'); + expectedArguments(\phpversion(), 0, 'amqp', 'apache', 'apc', 'apd', 'bbcode', 'bcmath', 'bcompiler', 'bz2', 'cairo', 'calendar', 'chdb', 'classkit', 'com', 'crack', 'ctype', 'cubrid', 'curl', 'cyrus', 'dba', 'dbase', 'dbplus', 'dbx', 'dio', 'dom', 'dotnet', 'eio', 'enchant', 'ev', 'event', 'exif', 'expect', 'fam', 'fbsql', 'fdf', 'fileinfo', 'filepro', 'filter', 'fribidi', 'ftp', 'gearman', 'gender', 'geoip', 'gettext', 'gmagick', 'gmp', 'gnupg', 'gupnp', 'haru', 'htscanner', 'pecl_http', 'hyperwave', 'hwapi', 'interbase', 'ibm_db2', 'iconv', 'id3', 'informix', 'iisfunc', 'gd', 'imagick', 'imap', 'include', 'ingres', 'inotify', 'intl', 'java', 'json', 'judy', 'kadm5', 'ktaglib', 'lapack', 'ldap', 'libevent', 'libxml', 'lua', 'lzf', 'mailparse', 'maxdb', 'mbstring', 'mcrypt', 'mcve', 'memcache', 'memcached', 'memtrack', 'mhash', 'ming', 'mnogosearch', 'mongo', 'mqseries', 'msession', 'msql', 'mssql', 'mysql', 'mysqli', 'mysqlnd', 'mysqlnd_memcache', 'mysqlnd_ms', 'mysqlnd_mux', 'mysqlnd_qc', 'mysqlnd_uh', 'ncurses', 'net_gopher', 'newt', 'notes', 'nsapi', 'oauth', 'oci8', 'oggvorbis', 'openal', 'openssl', 'ovrimos', 'paradox', 'parsekit', 'pcntl', 'pcre', 'pdflib', 'pdo', 'pdo_4d', 'pdo_cubrid', 'pdo_dblib', 'pdo_firebird', 'pdo_ibm', 'pdo_informix', 'pdo_mysql', 'pdo_oci', 'pdo_odbc', 'pdo_pgsql', 'pdo_sqlite', 'pdo_sqlsrv', 'pdo_pgsql', 'phar', 'posix', 'printer', 'proctitle', 'ps', 'pspell', 'pthreads', 'qtdom', 'quickhash', 'radius', 'rar', 'readline', 'recode', 'rpmreader', 'rrd', 'runkit', 'sam', 'sca', 'scream', 'sca_sdo', 'sysvmsg', 'session', 'session_pgsql', 'shmop', 'simplexml', 'snmp', 'soap', 'sockets', 'solr', 'sphinx', 'spl_types', 'spplus', 'sqlite', 'sqlite3', 'sqlsrv', 'ssdeep', 'ssh2', 'stats', 'stomp', 'svm', 'svn', 'swf', 'swish', 'sybase', 'taint', 'tcpwrap', 'tidy', 'tokenizer', 'tokyo_tyrant', 'trader', 'odbc', 'v8js', 'varnish', 'vpopmail', 'w32api', 'wddx', 'weakref', 'win32ps', 'win32service', 'wincache', 'xattr', 'xdiff', 'xhprof', 'xml', 'xmlreader', 'xmlrpc', 'xmlwriter', 'xsl', 'xslt', 'yaf', 'yaml', 'yaz', 'zip', 'zlib'); registerArgumentsSet('session_cache_limiters', 'public', 'private_no_expire', 'private', 'nocache'); expectedArguments(\session_cache_limiter(), 0, argumentsSet('session_cache_limiters')); From 76e6d9d00d11aa6a2e4980e773e6ae1fff13eda9 Mon Sep 17 00:00:00 2001 From: Luke Arms Date: Sun, 13 Aug 2023 01:12:03 +1000 Subject: [PATCH 26/73] WI-73896: Fix T_BAD_CHARACTER annotation --- tokenizer/tokenizer.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tokenizer/tokenizer.php b/tokenizer/tokenizer.php index d4aaf82c9..b67d2c50f 100644 --- a/tokenizer/tokenizer.php +++ b/tokenizer/tokenizer.php @@ -190,9 +190,6 @@ function token_name(int $id): string {} * @since 7.4 */ define('T_FN', 311); -/** - * @removed 7.0 - */ define('T_BAD_CHARACTER', 405); /** From 7adcba2bc4825e02886061391c1be205197c1264 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Wed, 23 Aug 2023 18:04:05 +0200 Subject: [PATCH 27/73] [phpstorm-stub] WI-73537 Added @throws PDOException for PDO::lastInsertId() --- PDO/PDO.php | 1 + 1 file changed, 1 insertion(+) diff --git a/PDO/PDO.php b/PDO/PDO.php index 98c06135a..bab566d70 100644 --- a/PDO/PDO.php +++ b/PDO/PDO.php @@ -1146,6 +1146,7 @@ public function query( * If the PDO driver does not support this capability, * PDO::lastInsertId triggers an * IM001 SQLSTATE. + * @throws PDOException On error if PDO::ERRMODE_EXCEPTION option is true. */ #[TentativeType] public function lastInsertId(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $name = null): string|false {} From de0f584c6c12d201ab89f9891fef68ba21c7ab19 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Thu, 24 Aug 2023 16:45:41 +0200 Subject: [PATCH 28/73] [phpstorm-stub] WI-73637 Added NumberFormatter::CURRENCY to method's NumberFormatter::create() signature. --- intl/intl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/intl.php b/intl/intl.php index 587a55a84..55b956ba7 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -957,7 +957,7 @@ public function __construct( #[TentativeType] public static function create( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED])] $style, + #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY])] $style, #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null ): ?NumberFormatter {} From c5a4b925667b9b165f490cb54070bd50e9bc3261 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Thu, 24 Aug 2023 17:22:01 +0200 Subject: [PATCH 29/73] [phpstorm-stub] WI-73637 Also added expected values to NumberFormatter constructor. --- intl/intl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/intl.php b/intl/intl.php index 55b956ba7..0474a42cf 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -926,7 +926,7 @@ class NumberFormatter #[Pure] public function __construct( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'int'], default: '')] $style, + #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY])] $style, #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null ) {} From a92e83f3496f0f237934c7725d3195025fe724f0 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Thu, 24 Aug 2023 17:54:29 +0200 Subject: [PATCH 30/73] [phpstorm-stub] WI-73637 Added all the expected values to NumberFormatter::create() and NumberFormatter::__constructor(). --- intl/intl.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/intl/intl.php b/intl/intl.php index 0474a42cf..33957ac21 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -926,7 +926,11 @@ class NumberFormatter #[Pure] public function __construct( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY])] $style, + #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, + NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY, NumberFormatter::PERCENT, + NumberFormatter::SCIENTIFIC, NumberFormatter::SPELLOUT, NumberFormatter::ORDINAL, + NumberFormatter::DURATION, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY_ACCOUNTING, + NumberFormatter::DEFAULT_STYLE, NumberFormatter::IGNORE])] $style, #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null ) {} @@ -957,7 +961,11 @@ public function __construct( #[TentativeType] public static function create( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY])] $style, + #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, + NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY, NumberFormatter::PERCENT, + NumberFormatter::SCIENTIFIC, NumberFormatter::SPELLOUT, NumberFormatter::ORDINAL, + NumberFormatter::DURATION, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY_ACCOUNTING, + NumberFormatter::DEFAULT_STYLE, NumberFormatter::IGNORE])] $style, #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null ): ?NumberFormatter {} From bdf6680c5f36aa814a777360ddddb6027799fb41 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Fri, 25 Aug 2023 14:02:03 +0200 Subject: [PATCH 31/73] [phpstorm-stub] WI-73041 Fixed return type in PHPDoc for substr(). --- standard/standard_1.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/standard/standard_1.php b/standard/standard_1.php index 79b579cfe..592e90438 100644 --- a/standard/standard_1.php +++ b/standard/standard_1.php @@ -499,7 +499,7 @@ function strcoll(string $string1, string $string2): int {} function money_format(string $format, float $number): ?string {} /** - * Return part of a string + * Return part of a string or false on failure. For PHP8.0+ only string is returned * @link https://php.net/manual/en/function.substr.php * @param string $string

* The input string. @@ -559,7 +559,6 @@ function money_format(string $format, float $number): ?string {} * $rest = substr("abcdef", -3, -1); // returns "de" * ?> * - * @return string|false the extracted part of string or false on failure. */ #[Pure] #[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")] From ef2dad0e42afd479a5079e5a8532ba5accfba716 Mon Sep 17 00:00:00 2001 From: szutoutou Date: Mon, 28 Aug 2023 18:10:36 +0800 Subject: [PATCH 32/73] Update RedisCluster.php fix sAdd params $value type --- redis/RedisCluster.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis/RedisCluster.php b/redis/RedisCluster.php index 5eee15f8a..9737026ef 100644 --- a/redis/RedisCluster.php +++ b/redis/RedisCluster.php @@ -878,9 +878,9 @@ public function sIsMember($key, $value) {} * If this value is already in the set, FALSE is returned. * * @param string $key Required key - * @param string $value1 Required value - * @param string $value2 Optional value - * @param string $valueN Optional value + * @param mixed $value1 Required value + * @param mixed $value2 Optional value + * @param mixed $valueN Optional value * * @return int|false The number of elements added to the set * @link https://redis.io/commands/sadd From 24c80bebffe88c86f312c008b65a99cc8aa8cd01 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Thu, 24 Aug 2023 12:49:45 +0200 Subject: [PATCH 33/73] [phpstorm-stubs] update for PHP 8.3 --- .github/workflows/main.yml | 4 +- Core/Core.php | 10 + PhpStormStubsMap.php | 79 +++ Reflection/ReflectionClass.php | 3 +- Reflection/ReflectionClassConstant.php | 10 + Reflection/ReflectionMethod.php | 5 + SPL/SPL.php | 52 +- curl/curl_d.php | 77 +++ date/date_c.php | 50 ++ dom/dom_c.php | 90 +++- gd/gd.php | 11 +- hash/hash.php | 2 +- imap/imap.php | 21 +- intl/IntlChar.php | 3 +- intl/intl.php | 472 ++++++++++-------- json/json.php | 5 + ldap/ldap.php | 5 + mbstring/mbstring.php | 5 + meta/attributes/Deprecated.php | 3 +- mysqli/mysqli.php | 8 +- openssl/openssl.php | 10 + pgsql/pgsql.php | 52 +- phpunit.xml.dist | 10 + posix/posix.php | 28 +- random/random.php | 39 +- sockets/sockets.php | 28 ++ sqlite3/sqlite3.php | 5 + standard/standard_4.php | 4 +- standard/standard_6.php | 5 + standard/standard_8.php | 35 +- standard/standard_9.php | 1 + tests/AbstractBaseStubsTestCase.php | 10 +- tests/BaseClassesTest.php | 23 +- tests/DockerImages/8.3/Dockerfile | 14 + tests/DockerImages/testRunner/Dockerfile | 22 +- tests/Model/BasePHPClass.php | 17 + tests/Model/PHPConst.php | 12 +- tests/Model/PHPEnum.php | 111 ++++ tests/Model/PHPEnumCase.php | 45 ++ tests/Model/PhpVersions.php | 2 +- tests/Model/StubsContainer.php | 62 +++ tests/Parsers/PHPReflectionParser.php | 13 +- tests/Parsers/ParserUtils.php | 10 +- tests/Parsers/Visitors/ASTVisitor.php | 26 +- .../StubsConstantsAndParametersValuesTest.php | 5 +- tests/StubsTypeHintsTest.php | 5 +- .../Reflection/ReflectionMethodsProvider.php | 9 +- tests/TestData/mutedProblems.json | 23 +- xml/xml.php | 5 +- 49 files changed, 1201 insertions(+), 345 deletions(-) create mode 100644 tests/DockerImages/8.3/Dockerfile create mode 100644 tests/Model/PHPEnum.php create mode 100644 tests/Model/PHPEnumCase.php diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 679d22906..473dddb81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] name: Run tests against php ${{matrix.php}} steps: - name: Checkout @@ -50,4 +50,4 @@ jobs: run: docker-compose -f docker-compose.yml run test_runner vendor/bin/phpunit --testsuite Structure - name: run cs fixer - run: docker-compose -f docker-compose.yml run test_runner composer cs + run: docker-compose -f docker-compose.yml run -e PHP_CS_FIXER_IGNORE_ENV=true test_runner composer cs diff --git a/Core/Core.php b/Core/Core.php index 7e4d5b5ac..6cdbecb38 100755 --- a/Core/Core.php +++ b/Core/Core.php @@ -166,6 +166,16 @@ function str_ends_with(string $haystack, string $needle): bool {} #[Pure] function str_contains(string $haystack, string $needle): bool {} +/** + * @since 8.3 + */ +function str_decrement(string $string): string {} + +/** + * @since 8.3 + */ +function str_increment(string $string): string {} + /** * Return the current key and value pair from an array and advance the array cursor * @link https://php.net/manual/en/function.each.php diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index 1d5d1597d..69270a021 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -418,8 +418,17 @@ final class PhpStormStubsMap 'DOMUserDataHandler' => 'dom/dom_c.php', 'DOMXPath' => 'dom/dom_c.php', 'DOTNET' => 'com_dotnet/com_dotnet.php', + 'DateError' => 'date/date_c.php', + 'DateException' => 'date/date_c.php', 'DateInterval' => 'date/date_c.php', + 'DateInvalidOperationException' => 'date/date_c.php', + 'DateInvalidTimeZoneException' => 'date/date_c.php', + 'DateMalformedIntervalStringException' => 'date/date_c.php', + 'DateMalformedPeriodStringException' => 'date/date_c.php', + 'DateMalformedStringException' => 'date/date_c.php', + 'DateObjectError' => 'date/date_c.php', 'DatePeriod' => 'date/date_c.php', + 'DateRangeError' => 'date/date_c.php', 'DateTime' => 'date/date_c.php', 'DateTimeImmutable' => 'date/date_c.php', 'DateTimeInterface' => 'date/date_c.php', @@ -789,6 +798,7 @@ final class PhpStormStubsMap 'Random\\Engine\\PcgOneseq128XslRr64' => 'random/random.php', 'Random\\Engine\\Secure' => 'random/random.php', 'Random\\Engine\\Xoshiro256StarStar' => 'random/random.php', + 'Random\\IntervalBoundary' => 'random/random.php', 'Random\\RandomError' => 'random/random.php', 'Random\\RandomException' => 'random/random.php', 'Random\\Randomizer' => 'random/random.php', @@ -868,6 +878,7 @@ final class PhpStormStubsMap 'SNMP' => 'snmp/snmp.php', 'SNMPException' => 'snmp/snmp.php', 'SQLite3' => 'sqlite3/sqlite3.php', + 'SQLite3Exception' => 'sqlite3/sqlite3.php', 'SQLite3Result' => 'sqlite3/sqlite3.php', 'SQLite3Stmt' => 'sqlite3/sqlite3.php', 'SQLiteDatabase' => 'SQLite/SQLite.php', @@ -3352,6 +3363,7 @@ final class PhpStormStubsMap 'json_encode' => 'json/json.php', 'json_last_error' => 'json/json.php', 'json_last_error_msg' => 'json/json.php', + 'json_validate' => 'json/json.php', 'juliantojd' => 'calendar/calendar.php', 'kafka_err2name' => 'simple_kafka_client/functions.php', 'kafka_err2str' => 'simple_kafka_client/functions.php', @@ -3388,6 +3400,7 @@ final class PhpStormStubsMap 'ldap_exop' => 'ldap/ldap.php', 'ldap_exop_passwd' => 'ldap/ldap.php', 'ldap_exop_refresh' => 'ldap/ldap.php', + 'ldap_exop_sync' => 'ldap/ldap.php', 'ldap_exop_whoami' => 'ldap/ldap.php', 'ldap_explode_dn' => 'ldap/ldap.php', 'ldap_first_attribute' => 'ldap/ldap.php', @@ -3713,6 +3726,7 @@ final class PhpStormStubsMap 'mb_scrub' => 'mbstring/mbstring.php', 'mb_send_mail' => 'mbstring/mbstring.php', 'mb_split' => 'mbstring/mbstring.php', + 'mb_str_pad' => 'mbstring/mbstring.php', 'mb_str_split' => 'mbstring/mbstring.php', 'mb_strcut' => 'mbstring/mbstring.php', 'mb_strimwidth' => 'mbstring/mbstring.php', @@ -4635,6 +4649,7 @@ final class PhpStormStubsMap 'pg_dbname' => 'pgsql/pgsql.php', 'pg_delete' => 'pgsql/pgsql.php', 'pg_end_copy' => 'pgsql/pgsql.php', + 'pg_enter_pipeline_mode' => 'pgsql/pgsql.php', 'pg_errormessage' => 'pgsql/pgsql.php', 'pg_escape_bytea' => 'pgsql/pgsql.php', 'pg_escape_identifier' => 'pgsql/pgsql.php', @@ -4642,6 +4657,7 @@ final class PhpStormStubsMap 'pg_escape_string' => 'pgsql/pgsql.php', 'pg_exec' => 'pgsql/pgsql.php', 'pg_execute' => 'pgsql/pgsql.php', + 'pg_exit_pipeline_mode' => 'pgsql/pgsql.php', 'pg_fetch_all' => 'pgsql/pgsql.php', 'pg_fetch_all_columns' => 'pgsql/pgsql.php', 'pg_fetch_array' => 'pgsql/pgsql.php', @@ -4705,6 +4721,8 @@ final class PhpStormStubsMap 'pg_parameter_status' => 'pgsql/pgsql.php', 'pg_pconnect' => 'pgsql/pgsql.php', 'pg_ping' => 'pgsql/pgsql.php', + 'pg_pipeline_status' => 'pgsql/pgsql.php', + 'pg_pipeline_sync' => 'pgsql/pgsql.php', 'pg_port' => 'pgsql/pgsql.php', 'pg_prepare' => 'pgsql/pgsql.php', 'pg_put_line' => 'pgsql/pgsql.php', @@ -4721,6 +4739,7 @@ final class PhpStormStubsMap 'pg_send_query' => 'pgsql/pgsql.php', 'pg_send_query_params' => 'pgsql/pgsql.php', 'pg_set_client_encoding' => 'pgsql/pgsql.php', + 'pg_set_error_context_visibility' => 'pgsql/pgsql.php', 'pg_set_error_verbosity' => 'pgsql/pgsql.php', 'pg_setclientencoding' => 'pgsql/pgsql.php', 'pg_socket' => 'pgsql/pgsql.php', @@ -4759,6 +4778,7 @@ final class PhpStormStubsMap 'pos' => 'standard/standard_9.php', 'posix_access' => 'posix/posix.php', 'posix_ctermid' => 'posix/posix.php', + 'posix_eaccess' => 'posix/posix.php', 'posix_errno' => 'posix/posix.php', 'posix_get_last_error' => 'posix/posix.php', 'posix_getcwd' => 'posix/posix.php', @@ -4791,6 +4811,7 @@ final class PhpStormStubsMap 'posix_setsid' => 'posix/posix.php', 'posix_setuid' => 'posix/posix.php', 'posix_strerror' => 'posix/posix.php', + 'posix_sysconf' => 'posix/posix.php', 'posix_times' => 'posix/posix.php', 'posix_ttyname' => 'posix/posix.php', 'posix_uname' => 'posix/posix.php', @@ -5028,6 +5049,7 @@ final class PhpStormStubsMap 'socket_addrinfo_connect' => 'sockets/sockets.php', 'socket_addrinfo_explain' => 'sockets/sockets.php', 'socket_addrinfo_lookup' => 'sockets/sockets.php', + 'socket_atmark' => 'sockets/sockets.php', 'socket_bind' => 'sockets/sockets.php', 'socket_clear_error' => 'sockets/sockets.php', 'socket_close' => 'sockets/sockets.php', @@ -5379,8 +5401,10 @@ final class PhpStormStubsMap 'stomp_unsubscribe' => 'stomp/stomp.php', 'stomp_version' => 'stomp/stomp.php', 'str_contains' => 'Core/Core.php', + 'str_decrement' => 'Core/Core.php', 'str_ends_with' => 'Core/Core.php', 'str_getcsv' => 'standard/standard_2.php', + 'str_increment' => 'Core/Core.php', 'str_ireplace' => 'standard/standard_1.php', 'str_pad' => 'standard/standard_2.php', 'str_repeat' => 'standard/standard_1.php', @@ -5405,6 +5429,7 @@ final class PhpStormStubsMap 'stream_context_get_params' => 'standard/standard_6.php', 'stream_context_set_default' => 'standard/standard_6.php', 'stream_context_set_option' => 'standard/standard_6.php', + 'stream_context_set_options' => 'standard/standard_6.php', 'stream_context_set_params' => 'standard/standard_6.php', 'stream_copy_to_stream' => 'standard/standard_6.php', 'stream_filter_append' => 'standard/standard_6.php', @@ -6586,6 +6611,8 @@ final class PhpStormStubsMap 'CURLHSTS_READONLYFILE' => 'curl/curl_d.php', 'CURLINFO_APPCONNECT_TIME' => 'curl/curl_d.php', 'CURLINFO_APPCONNECT_TIME_T' => 'curl/curl_d.php', + 'CURLINFO_CAINFO' => 'curl/curl_d.php', + 'CURLINFO_CAPATH' => 'curl/curl_d.php', 'CURLINFO_CERTINFO' => 'curl/curl_d.php', 'CURLINFO_CONDITION_UNMET' => 'curl/curl_d.php', 'CURLINFO_CONNECT_TIME' => 'curl/curl_d.php', @@ -6650,6 +6677,11 @@ final class PhpStormStubsMap 'CURLINFO_STARTTRANSFER_TIME_T' => 'curl/curl_d.php', 'CURLINFO_TOTAL_TIME' => 'curl/curl_d.php', 'CURLINFO_TOTAL_TIME_T' => 'curl/curl_d.php', + 'CURLKHMATCH_LAST' => 'curl/curl_d.php', + 'CURLKHMATCH_MISMATCH' => 'curl/curl_d.php', + 'CURLKHMATCH_MISSING' => 'curl/curl_d.php', + 'CURLKHMATCH_OK' => 'curl/curl_d.php', + 'CURLMIMEOPT_FORMESCAPE' => 'curl/curl_d.php', 'CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE' => 'curl/curl_d.php', 'CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE' => 'curl/curl_d.php', 'CURLMOPT_MAXCONNECTS' => 'curl/curl_d.php', @@ -6681,6 +6713,7 @@ final class PhpStormStubsMap 'CURLOPT_CAINFO' => 'curl/curl_d.php', 'CURLOPT_CAINFO_BLOB' => 'curl/curl_d.php', 'CURLOPT_CAPATH' => 'curl/curl_d.php', + 'CURLOPT_CA_CACHE_TIMEOUT' => 'curl/curl_d.php', 'CURLOPT_CERTINFO' => 'curl/curl_d.php', 'CURLOPT_CLOSEPOLICY' => 'curl/curl_d.php', 'CURLOPT_CONNECTTIMEOUT' => 'curl/curl_d.php', @@ -6780,6 +6813,7 @@ final class PhpStormStubsMap 'CURLOPT_MAXREDIRS' => 'curl/curl_d.php', 'CURLOPT_MAX_RECV_SPEED_LARGE' => 'curl/curl_d.php', 'CURLOPT_MAX_SEND_SPEED_LARGE' => 'curl/curl_d.php', + 'CURLOPT_MIME_OPTIONS' => 'curl/curl_d.php', 'CURLOPT_MUTE' => 'curl/curl_d.php', 'CURLOPT_NETRC' => 'curl/curl_d.php', 'CURLOPT_NETRC_FILE' => 'curl/curl_d.php', @@ -6804,6 +6838,7 @@ final class PhpStormStubsMap 'CURLOPT_PRIVATE' => 'curl/curl_d.php', 'CURLOPT_PROGRESSFUNCTION' => 'curl/curl_d.php', 'CURLOPT_PROTOCOLS' => 'curl/curl_d.php', + 'CURLOPT_PROTOCOLS_STR' => 'curl/curl_d.php', 'CURLOPT_PROXY' => 'curl/curl_d.php', 'CURLOPT_PROXYAUTH' => 'curl/curl_d.php', 'CURLOPT_PROXYHEADER' => 'curl/curl_d.php', @@ -6838,12 +6873,14 @@ final class PhpStormStubsMap 'CURLOPT_PROXY_TLSAUTH_USERNAME' => 'curl/curl_d.php', 'CURLOPT_PROXY_TRANSFER_MODE' => 'curl/curl_d.php', 'CURLOPT_PUT' => 'curl/curl_d.php', + 'CURLOPT_QUICK_EXIT' => 'curl/curl_d.php', 'CURLOPT_QUOTE' => 'curl/curl_d.php', 'CURLOPT_RANDOM_FILE' => 'curl/curl_d.php', 'CURLOPT_RANGE' => 'curl/curl_d.php', 'CURLOPT_READDATA' => 'curl/curl_d.php', 'CURLOPT_READFUNCTION' => 'curl/curl_d.php', 'CURLOPT_REDIR_PROTOCOLS' => 'curl/curl_d.php', + 'CURLOPT_REDIR_PROTOCOLS_STR' => 'curl/curl_d.php', 'CURLOPT_REFERER' => 'curl/curl_d.php', 'CURLOPT_REQUEST_TARGET' => 'curl/curl_d.php', 'CURLOPT_RESOLVE' => 'curl/curl_d.php', @@ -6865,6 +6902,7 @@ final class PhpStormStubsMap 'CURLOPT_SOCKS5_GSSAPI_SERVICE' => 'curl/curl_d.php', 'CURLOPT_SSH_AUTH_TYPES' => 'curl/curl_d.php', 'CURLOPT_SSH_COMPRESSION' => 'curl/curl_d.php', + 'CURLOPT_SSH_HOSTKEYFUNCTION' => 'curl/curl_d.php', 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' => 'curl/curl_d.php', 'CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256' => 'curl/curl_d.php', 'CURLOPT_SSH_KNOWNHOSTS' => 'curl/curl_d.php', @@ -6927,6 +6965,7 @@ final class PhpStormStubsMap 'CURLOPT_WILDCARDMATCH' => 'curl/curl_d.php', 'CURLOPT_WRITEFUNCTION' => 'curl/curl_d.php', 'CURLOPT_WRITEHEADER' => 'curl/curl_d.php', + 'CURLOPT_WS_OPTIONS' => 'curl/curl_d.php', 'CURLOPT_XFERINFOFUNCTION' => 'curl/curl_d.php', 'CURLOPT_XOAUTH2_BEARER' => 'curl/curl_d.php', 'CURLPAUSE_ALL' => 'curl/curl_d.php', @@ -7032,6 +7071,7 @@ final class PhpStormStubsMap 'CURLUSESSL_NONE' => 'curl/curl_d.php', 'CURLUSESSL_TRY' => 'curl/curl_d.php', 'CURLVERSION_NOW' => 'curl/curl_d.php', + 'CURLWS_RAW_MODE' => 'curl/curl_d.php', 'CURL_FNMATCHFUNC_FAIL' => 'curl/curl_d.php', 'CURL_FNMATCHFUNC_MATCH' => 'curl/curl_d.php', 'CURL_FNMATCHFUNC_NOMATCH' => 'curl/curl_d.php', @@ -8218,9 +8258,17 @@ final class PhpStormStubsMap 'IPV6_TCLASS' => 'sockets/sockets.php', 'IPV6_UNICAST_HOPS' => 'sockets/sockets.php', 'IPV6_V6ONLY' => 'sockets/sockets.php', + 'IP_BIND_ADDRESS_NO_PORT' => 'sockets/sockets.php', + 'IP_MTU_DISCOVER' => 'sockets/sockets.php', 'IP_MULTICAST_IF' => 'sockets/sockets.php', 'IP_MULTICAST_LOOP' => 'sockets/sockets.php', 'IP_MULTICAST_TTL' => 'sockets/sockets.php', + 'IP_PMTUDISC_DO' => 'sockets/sockets.php', + 'IP_PMTUDISC_DONT' => 'sockets/sockets.php', + 'IP_PMTUDISC_INTERFACE' => 'sockets/sockets.php', + 'IP_PMTUDISC_OMIT' => 'sockets/sockets.php', + 'IP_PMTUDISC_PROBE' => 'sockets/sockets.php', + 'IP_PMTUDISC_WANT' => 'sockets/sockets.php', 'ImageButton' => 'winbinder/winbinder.php', 'InvisibleArea' => 'winbinder/winbinder.php', 'JOB_QUEUE_PRIORITY_HIGH' => 'zend/zend_d.php', @@ -10512,6 +10560,7 @@ final class PhpStormStubsMap 'OPENSSL_CMS_NOINTERN' => 'openssl/openssl.php', 'OPENSSL_CMS_NOSIGS' => 'openssl/openssl.php', 'OPENSSL_CMS_NOVERIFY' => 'openssl/openssl.php', + 'OPENSSL_CMS_OLDMIMETYPE' => 'openssl/openssl.php', 'OPENSSL_CMS_TEXT' => 'openssl/openssl.php', 'OPENSSL_DEFAULT_STREAM_CIPHERS' => 'openssl/openssl.php', 'OPENSSL_DONT_ZERO_PAD_KEY' => 'openssl/openssl.php', @@ -10639,6 +10688,7 @@ final class PhpStormStubsMap 'PGSQL_DML_STRING' => 'pgsql/pgsql.php', 'PGSQL_EMPTY_QUERY' => 'pgsql/pgsql.php', 'PGSQL_ERRORS_DEFAULT' => 'pgsql/pgsql.php', + 'PGSQL_ERRORS_SQLSTATE' => 'pgsql/pgsql.php', 'PGSQL_ERRORS_TERSE' => 'pgsql/pgsql.php', 'PGSQL_ERRORS_VERBOSE' => 'pgsql/pgsql.php', 'PGSQL_FATAL_ERROR' => 'pgsql/pgsql.php', @@ -10649,6 +10699,10 @@ final class PhpStormStubsMap 'PGSQL_NOTICE_CLEAR' => 'pgsql/pgsql.php', 'PGSQL_NOTICE_LAST' => 'pgsql/pgsql.php', 'PGSQL_NUM' => 'pgsql/pgsql.php', + 'PGSQL_PIPELINE_ABORTED' => 'pgsql/pgsql.php', + 'PGSQL_PIPELINE_OFF' => 'pgsql/pgsql.php', + 'PGSQL_PIPELINE_ON' => 'pgsql/pgsql.php', + 'PGSQL_PIPELINE_SYNC' => 'pgsql/pgsql.php', 'PGSQL_POLLING_ACTIVE' => 'pgsql/pgsql.php', 'PGSQL_POLLING_FAILED' => 'pgsql/pgsql.php', 'PGSQL_POLLING_OK' => 'pgsql/pgsql.php', @@ -10657,8 +10711,12 @@ final class PhpStormStubsMap 'PGSQL_SEEK_CUR' => 'pgsql/pgsql.php', 'PGSQL_SEEK_END' => 'pgsql/pgsql.php', 'PGSQL_SEEK_SET' => 'pgsql/pgsql.php', + 'PGSQL_SHOW_CONTEXT_ALWAYS' => 'pgsql/pgsql.php', + 'PGSQL_SHOW_CONTEXT_ERRORS' => 'pgsql/pgsql.php', + 'PGSQL_SHOW_CONTEXT_NEVER' => 'pgsql/pgsql.php', 'PGSQL_STATUS_LONG' => 'pgsql/pgsql.php', 'PGSQL_STATUS_STRING' => 'pgsql/pgsql.php', + 'PGSQL_TRACE_REGRESS_MODE' => 'pgsql/pgsql.php', 'PGSQL_TRANSACTION_ACTIVE' => 'pgsql/pgsql.php', 'PGSQL_TRANSACTION_IDLE' => 'pgsql/pgsql.php', 'PGSQL_TRANSACTION_INERROR' => 'pgsql/pgsql.php', @@ -10752,6 +10810,7 @@ final class PhpStormStubsMap 'PKCS7_NOCERTS' => 'openssl/openssl.php', 'PKCS7_NOCHAIN' => 'openssl/openssl.php', 'PKCS7_NOINTERN' => 'openssl/openssl.php', + 'PKCS7_NOOLDMIMETYPE' => 'openssl/openssl.php', 'PKCS7_NOSIGS' => 'openssl/openssl.php', 'PKCS7_NOVERIFY' => 'openssl/openssl.php', 'PKCS7_TEXT' => 'openssl/openssl.php', @@ -10771,6 +10830,16 @@ final class PhpStormStubsMap 'POLL_PRI' => 'pcntl/pcntl.php', 'POSITIVE_SIGN' => 'standard/standard_defines.php', 'POSIX_F_OK' => 'posix/posix.php', + 'POSIX_PC_ALLOC_SIZE_MIN' => 'posix/posix.php', + 'POSIX_PC_CHOWN_RESTRICTED' => 'posix/posix.php', + 'POSIX_PC_LINK_MAX' => 'posix/posix.php', + 'POSIX_PC_MAX_CANON' => 'posix/posix.php', + 'POSIX_PC_MAX_INPUT' => 'posix/posix.php', + 'POSIX_PC_NAME_MAX' => 'posix/posix.php', + 'POSIX_PC_NO_TRUNC' => 'posix/posix.php', + 'POSIX_PC_PATH_MAX' => 'posix/posix.php', + 'POSIX_PC_PIPE_BUF' => 'posix/posix.php', + 'POSIX_PC_SYMLINK_MAX' => 'posix/posix.php', 'POSIX_RLIMIT_AS' => 'posix/posix.php', 'POSIX_RLIMIT_CORE' => 'posix/posix.php', 'POSIX_RLIMIT_CPU' => 'posix/posix.php', @@ -10789,6 +10858,10 @@ final class PhpStormStubsMap 'POSIX_RLIMIT_SIGPENDING' => 'posix/posix.php', 'POSIX_RLIMIT_STACK' => 'posix/posix.php', 'POSIX_R_OK' => 'posix/posix.php', + 'POSIX_SC_ARG_MAX' => 'posix/posix.php', + 'POSIX_SC_NPROCESSORS_CONF' => 'posix/posix.php', + 'POSIX_SC_NPROCESSORS_ONLN' => 'posix/posix.php', + 'POSIX_SC_PAGESIZE' => 'posix/posix.php', 'POSIX_S_IFBLK' => 'posix/posix.php', 'POSIX_S_IFCHR' => 'posix/posix.php', 'POSIX_S_IFIFO' => 'posix/posix.php', @@ -11847,6 +11920,7 @@ final class PhpStormStubsMap 'SOL_SOCKET' => 'sockets/sockets.php', 'SOL_TCP' => 'sockets/sockets.php', 'SOL_UDP' => 'sockets/sockets.php', + 'SOL_UDPLITE' => 'sockets/sockets.php', 'SOMAXCONN' => 'sockets/sockets.php', 'SORTARRIVAL' => 'imap/imap.php', 'SORTCC' => 'imap/imap.php', @@ -11863,10 +11937,13 @@ final class PhpStormStubsMap 'SORT_NUMERIC' => 'standard/standard_defines.php', 'SORT_REGULAR' => 'standard/standard_defines.php', 'SORT_STRING' => 'standard/standard_defines.php', + 'SO_ATTACH_REUSEPORT_CBPF' => 'sockets/sockets.php', 'SO_BINDTODEVICE' => 'sockets/sockets.php', 'SO_BPF_EXTENSIONS' => 'sockets/sockets.php', 'SO_BROADCAST' => 'sockets/sockets.php', 'SO_DEBUG' => 'sockets/sockets.php', + 'SO_DETACH_BPF' => 'sockets/sockets.php', + 'SO_DETACH_FILTER' => 'sockets/sockets.php', 'SO_DONTROUTE' => 'sockets/sockets.php', 'SO_ERROR' => 'sockets/sockets.php', 'SO_FREE' => 'imap/imap.php', @@ -12770,6 +12847,8 @@ final class PhpStormStubsMap 'TCP_KEEPINTVL' => 'sockets/sockets.php', 'TCP_NODELAY' => 'sockets/sockets.php', 'TCP_NOTSENT_LOWAT' => 'sockets/sockets.php', + 'TCP_QUICKACK' => 'sockets/sockets.php', + 'TCP_REPAIR' => 'sockets/sockets.php', 'THOUSANDS_SEP' => 'standard/standard_defines.php', 'THOUSEP' => 'standard/standard_defines.php', 'TIDY_NODETYPE_ASP' => 'tidy/tidy.php', diff --git a/Reflection/ReflectionClass.php b/Reflection/ReflectionClass.php index 554c1fa92..71a8a25a9 100644 --- a/Reflection/ReflectionClass.php +++ b/Reflection/ReflectionClass.php @@ -525,7 +525,8 @@ public function isSubclassOf(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass */ #[Pure] #[TentativeType] - public function getStaticProperties(): ?array {} + #[LanguageLevelTypeAware(['8.3' => 'array'], default: 'array|null')] + public function getStaticProperties() {} /** * Gets static property value diff --git a/Reflection/ReflectionClassConstant.php b/Reflection/ReflectionClassConstant.php index d2f3d3c4c..a75bda616 100644 --- a/Reflection/ReflectionClassConstant.php +++ b/Reflection/ReflectionClassConstant.php @@ -220,4 +220,14 @@ public function isEnumCase(): bool {} * @since 8.1 */ public function isFinal(): bool {} + + /** + * @since 8.3 + */ + public function hasType(): bool {} + + /** + * @since 8.3 + */ + public function getType(): ?ReflectionType {} } diff --git a/Reflection/ReflectionMethod.php b/Reflection/ReflectionMethod.php index da59e0338..72da0035b 100644 --- a/Reflection/ReflectionMethod.php +++ b/Reflection/ReflectionMethod.php @@ -301,4 +301,9 @@ public function setAccessible(bool $accessible): void {} #[PhpStormStubsElementAvailable(from: '8.2')] public function hasPrototype(): bool {} + + /** + * @since 8.3 + */ + public static function createFromMethodName(string $method): static {} } diff --git a/SPL/SPL.php b/SPL/SPL.php index 4353bb7d4..73b351d50 100644 --- a/SPL/SPL.php +++ b/SPL/SPL.php @@ -1683,20 +1683,18 @@ public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '') /** * Sort the entries by value * @link https://php.net/manual/en/arrayobject.asort.php - * @param int $flags [optional] - * @return bool */ #[TentativeType] - public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {} /** * Sort the entries by key * @link https://php.net/manual/en/arrayobject.ksort.php - * @param int $flags [optional] - * @return bool */ #[TentativeType] - public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {} /** * Sort the entries with a user-defined comparison function and maintain key association @@ -1709,10 +1707,10 @@ public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = * be respectively less than, equal to, or greater than the * second. *

- * @return bool */ #[TentativeType] - public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {} /** * Sort the entries by keys using a user-defined comparison function @@ -1728,26 +1726,26 @@ public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: * be respectively less than, equal to, or greater than the * second. *

- * @return bool */ #[TentativeType] - public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {} /** * Sort entries using a "natural order" algorithm * @link https://php.net/manual/en/arrayobject.natsort.php - * @return bool */ #[TentativeType] - public function natsort(): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function natsort() {} /** * Sort an array using a case insensitive "natural order" algorithm * @link https://php.net/manual/en/arrayobject.natcasesort.php - * @return bool */ #[TentativeType] - public function natcasesort(): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function natcasesort() {} /** * Unserialize an ArrayObject @@ -1955,20 +1953,18 @@ public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '') /** * Sort array by values * @link https://php.net/manual/en/arrayiterator.asort.php - * @param int $flags [optional] - * @return bool */ #[TentativeType] - public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function asort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {} /** * Sort array by keys * @link https://php.net/manual/en/arrayiterator.ksort.php - * @param int $flags [optional] - * @return bool */ #[TentativeType] - public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = SORT_REGULAR) {} /** * User defined sort @@ -1976,10 +1972,10 @@ public function ksort(#[PhpStormStubsElementAvailable(from: '8.0')] int $flags = * @param callable $callback

* The compare function used for the sort. *

- * @return void */ #[TentativeType] - public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {} /** * User defined sort @@ -1987,26 +1983,26 @@ public function uasort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: * @param callable $callback

* The compare function used for the sort. *

- * @return void */ #[TentativeType] - public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function uksort(#[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback) {} /** * Sort an array naturally * @link https://php.net/manual/en/arrayiterator.natsort.php - * @return bool */ #[TentativeType] - public function natsort(): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function natsort() {} /** * Sort an array naturally, case insensitive * @link https://php.net/manual/en/arrayiterator.natcasesort.php - * @return bool */ #[TentativeType] - public function natcasesort(): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function natcasesort() {} /** * Unserialize diff --git a/curl/curl_d.php b/curl/curl_d.php index 22ed96f49..52b15e8cf 100644 --- a/curl/curl_d.php +++ b/curl/curl_d.php @@ -1120,6 +1120,17 @@ * @since 5.2.4 */ define('CURLINFO_PRIVATE', 1048597); + +/** + * @since 8.3 + */ +define('CURLINFO_CAPATH', 1048638); + +/** + * @since 8.3 + */ +define('CURLINFO_CAINFO', 1048637); + /** * Supports IPv6 * @link https://php.net/manual/en/curl.constants.php @@ -1151,6 +1162,37 @@ * @link https://curl.haxx.se/libcurl/c/libcurl-errors.html */ define('CURLE_OK', 0); + +/** + * @since 8.3 + */ +define('CURLKHMATCH_OK', 0); + +/** + * @since 8.3 + */ +define('CURLKHMATCH_MISMATCH', 1); + +/** + * @since 8.3 + */ +define('CURLKHMATCH_MISSING', 2); + +/** + * @since 8.3 + */ +define('CURLKHMATCH_LAST', 3); + +/** + * @since 8.3 + */ +define('CURLOPT_MIME_OPTIONS', 315); + +/** + * @since 8.3 + */ +define('CURLMIMEOPT_FORMESCAPE', 1); + /** * The URL you passed to libcurl used a protocol that this libcurl does not support. * The support might be a compile-time option that you didn't use, @@ -2061,6 +2103,41 @@ */ define('CURLOPT_SERVICE_NAME', 10236); +/** + * @since 8.3 + */ +define('CURLOPT_SSH_HOSTKEYFUNCTION', 20316); + +/** + * @since 8.3 + */ +define('CURLOPT_PROTOCOLS_STR', 10318); + +/** + * @since 8.3 + */ +define('CURLOPT_REDIR_PROTOCOLS_STR', 10319); + +/** + * @since 8.3 + */ +define('CURLOPT_WS_OPTIONS', 320); + +/** + * @since 8.3 + */ +define('CURLWS_RAW_MODE', 1); + +/** + * @since 8.3 + */ +define('CURLOPT_CA_CACHE_TIMEOUT', 321); + +/** + * @since 8.3 + */ +define('CURLOPT_QUICK_EXIT', 322); + /** * Value for the CURLOPT_SSH_AUTH_TYPES option. * libcurl attempts to connect to ssh-agent or pageant and let the agent attempt the authentication. diff --git a/date/date_c.php b/date/date_c.php index d6db7e837..c297e6ca0 100644 --- a/date/date_c.php +++ b/date/date_c.php @@ -1100,4 +1100,54 @@ public function __serialize(): array {} #[PhpStormStubsElementAvailable(from: '8.2')] public function __unserialize(array $data): void {} + + /** + * @since 8.3 + */ + public static function createFromISO8601String(string $specification, int $options = 0): static {} } + +/** + * @since 8.3 + */ +class DateError extends Error {} + +/** + * @since 8.3 + */ +class DateObjectError extends DateError {} + +/** + * @since 8.3 + */ +class DateRangeError extends DateError {} + +/** + * @since 8.3 + */ +class DateException extends Exception {} + +/** + * @since 8.3 + */ +class DateInvalidTimeZoneException extends DateException {} + +/** + * @since 8.3 + */ +class DateInvalidOperationException extends DateException {} + +/** + * @since 8.3 + */ +class DateMalformedStringException extends DateException {} + +/** + * @since 8.3 + */ +class DateMalformedIntervalStringException extends DateException {} + +/** + * @since 8.3 + */ +class DateMalformedPeriodStringException extends DateException {} diff --git a/dom/dom_c.php b/dom/dom_c.php index 4bf64209f..099399e40 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -142,6 +142,8 @@ class DOMNode */ #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] public $textContent; + public bool $isConnected; + public ?DOMElement $parentElement; /** * Adds a new child before a reference node @@ -318,9 +320,15 @@ public function lookupNamespaceUri($prefix) {} /** * @param DOMNode $arg * @return bool + * @removed 8.0 */ public function isEqualNode(DOMNode $arg) {} + /** + * @since 8.3 + */ + public function isEqualNode(?DOMNode $otherNode): bool {} + /** * @param $feature * @param $version @@ -391,6 +399,16 @@ public function C14NFile( #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $xpath = null, #[LanguageLevelTypeAware(['8.0' => 'array|null'], default: 'array')] $nsPrefixes = null ): int|false {} + + /** + * @since 8.3 + */ + public function contains(DOMNode|DOMNameSpaceNode|null $other): bool {} + + /** + * @since 8.3 + */ + public function getRootNode(?array $options = []): DOMNode {} } /** @@ -577,6 +595,8 @@ class DOMNameSpaceNode #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] public $nodeName; + public ?DOMElement $parentElement; + public bool $isConnected; } /** @@ -616,6 +636,12 @@ public function append(...$nodes): void {} * {@inheritDoc} */ public function prepend(...$nodes): void {} + + /** + * @since 8.3 + * {@inheritDoc} + */ + public function replaceChildren(...$nodes): void {} } /** @@ -1001,9 +1027,8 @@ public function getElementsByTagNameNS( #[TentativeType] public function getElementById(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $elementId): ?DOMElement {} - /** - * @param DOMNode $node - */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.3' => 'DOMNode|false'], default: '')] public function adoptNode(DOMNode $node) {} /** @@ -1016,6 +1041,12 @@ public function append(...$nodes): void {} */ public function prepend(...$nodes): void {} + /** + * @since 8.3 + * {@inheritDoc} + */ + public function replaceChildren(...$nodes): void {} + /** * Normalizes the document * @link https://php.net/manual/en/domdocument.normalizedocument.php @@ -1041,10 +1072,12 @@ public function renameNode(DOMNode $node, $namespace, $qualifiedName) {} * Bitwise OR * of the libxml option constants. *

- * @return DOMDocument|bool true on success or false on failure. If called statically, returns a + * @return DOMDocument|bool true on success or false on failure. Prior to PHP 8.3 if called statically, returns a * DOMDocument and issues E_STRICT * warning. */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')] public function load( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null @@ -1073,10 +1106,12 @@ public function save($filename, $options = null) {} * Bitwise OR * of the libxml option constants. *

- * @return DOMDocument|bool true on success or false on failure. If called statically, returns a + * @return DOMDocument|bool true on success or false on failure. Prior to PHP 8.3 if called statically, returns a * DOMDocument and issues E_STRICT * warning. */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')] public function loadXML( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null @@ -1142,10 +1177,12 @@ public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '') * Since PHP 5.4.0 and Libxml 2.6.0, you may also * use the options parameter to specify additional Libxml parameters. *

- * @return DOMDocument|bool true on success or false on failure. If called statically, returns a + * @return DOMDocument|bool true on success or false on failure. Prior to PHP 8.3 if called statically, returns a * DOMDocument and issues E_STRICT * warning. */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')] public function loadHTML( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0 @@ -1161,10 +1198,12 @@ public function loadHTML( * Since PHP 5.4.0 and Libxml 2.6.0, you may also * use the options parameter to specify additional Libxml parameters. *

- * @return DOMDocument|bool true on success or false on failure. If called statically, returns a + * @return DOMDocument|bool true on success or false on failure. Prior to PHP 8.3 if called statically, returns a * DOMDocument and issues E_STRICT * warning. */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')] public function loadHTMLFile( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0 @@ -1443,10 +1482,10 @@ public function substringData( * @param string $data

* The string to append. *

- * @return void */ #[TentativeType] - public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function appendData(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {} /** * Insert a string at the specified 16-bit unit offset @@ -1679,6 +1718,8 @@ class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')] public $nextElementSibling; + public string $id; + public string $className; /** * Returns value of attribute @@ -1976,6 +2017,12 @@ public function append(...$nodes): void {} */ public function prepend(...$nodes): void {} + /** + * @since 8.3 + * {@inheritDoc} + */ + public function replaceChildren(...$nodes): void {} + /** * Creates a new DOMElement object * @link https://php.net/manual/en/domelement.construct.php @@ -1989,6 +2036,26 @@ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $value = null, #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace = null ) {} + + /** + * @since 8.3 + */ + public function getAttributeNames(): array {} + + /** + * @since 8.3 + */ + public function toggleAttribute(string $qualifiedName, ?bool $force = false): bool {} + + /** + * @since 8.3 + */ + public function insertAdjacentElement(string $where, DOMElement $element): ?DOMElement {} + + /** + * @since 8.3 + */ + public function insertAdjacentText(string $where, string $data): void {} } /** @@ -2455,6 +2522,11 @@ public function append(...$nodes): void; * @since 8.0 */ public function prepend(...$nodes): void; + + /** + * @since 8.3 + */ + public function replaceChildren(...$nodes): void; } /** diff --git a/gd/gd.php b/gd/gd.php index 3e9ee1114..a35700fdb 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -818,11 +818,16 @@ function imagecopyresampled(GdImage $dst_image, GdImage $src_image, int $dst_x, * Specifies the color of the uncovered zone after the rotation *

* @param bool $ignore_transparent [optional]

- * If set and non-zero, transparent colors are ignored (otherwise kept). + * Prior to PHP 8.3 if set and non-zero, transparent colors are ignored (otherwise kept). *

* @return resource|GdImage|false the rotated image or FALSE on failure */ -function imagerotate(GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false): GdImage|false {} +function imagerotate( + GdImage $image, + float $angle, + int $background_color, + #[PhpStormStubsElementAvailable(to: '8.2')] bool $ignore_transparent = false +): GdImage|false {} /** * Should antialias functions be used or not.
@@ -1116,7 +1121,7 @@ function imagegd(GdImage $image, ?string $file = null): bool {} *

* @return bool true on success or false on failure. */ -function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = null, int $mode = null): bool {} +function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = 1): bool {} /** * Destroy an image diff --git a/hash/hash.php b/hash/hash.php index 923bd6744..1ba1003c7 100644 --- a/hash/hash.php +++ b/hash/hash.php @@ -296,7 +296,7 @@ function hash_pbkdf2( int $iterations, int $length = 0, bool $binary = false, - #[PhpStormStubsElementAvailable(from: '8.1', to: '8.1')] array $options = [] + #[PhpStormStubsElementAvailable(from: '8.1')] array $options = [] ): string {} /** diff --git a/imap/imap.php b/imap/imap.php index 7f92a91a3..9a64c233e 100644 --- a/imap/imap.php +++ b/imap/imap.php @@ -86,9 +86,10 @@ function imap_reopen( * deletion. You can achieve the same thing by using * imap_expunge *

- * @return bool TRUE on success or FALSE on failure. + * @return bool|true TRUE on success or FALSE on failure. Since PHP 8.3 always true */ -function imap_close(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = 0): bool {} +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] +function imap_close(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = 0) {} /** * Gets the number of messages in the current mailbox @@ -491,21 +492,21 @@ function imap_fetchstructure(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection * IMAP_GC_ENV (enveloppe and bodies), * IMAP_GC_TEXTS (texts). *

- * @return bool TRUE on success or FALSE on failure. */ +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] function imap_gc( #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] int $flags = 0, #[PhpStormStubsElementAvailable(from: '8.0')] int $flags -): bool {} +) {} /** * Delete all messages marked for deletion * @link https://php.net/manual/en/function.imap-expunge.php * @param resource $imap - * @return bool TRUE. */ -function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap): bool {} +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] +function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap) {} /** * Mark a message for deletion from current mailbox @@ -519,8 +520,8 @@ function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], def * to treat the msg_number argument as an * UID. *

- * @return bool TRUE. */ +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {} /** @@ -531,8 +532,8 @@ function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], defa * The message number *

* @param int $flags [optional] - * @return bool TRUE on success or FALSE on failure. */ +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] function imap_undelete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {} /** @@ -886,8 +887,8 @@ function imap_mailboxmsginfo(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection * A bit mask that may contain the single option: * ST_UID - The sequence argument contains UIDs * instead of sequence numbers

- * @return bool TRUE on success or FALSE on failure. */ +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = NIL): bool {} /** @@ -908,8 +909,8 @@ function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'] * the single option: * ST_UID - The sequence argument contains UIDs * instead of sequence numbers

- * @return bool TRUE on success or FALSE on failure. */ +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] function imap_clearflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = 0): bool {} /** diff --git a/intl/IntlChar.php b/intl/IntlChar.php index c5775d583..25fc91199 100644 --- a/intl/IntlChar.php +++ b/intl/IntlChar.php @@ -902,12 +902,13 @@ public static function digit( * @since 7.0 */ #[TentativeType] + #[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'bool|null')] public static function enumCharNames( #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $start, #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $end, #[LanguageLevelTypeAware(['8.0' => 'callable'], default: '')] $callback, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = IntlChar::UNICODE_CHAR_NAME - ): ?bool {} + ) {} /** * Enumerate all code points with their Unicode general categories diff --git a/intl/intl.php b/intl/intl.php index 33957ac21..7d72ddec0 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -4,7 +4,7 @@ use JetBrains\PhpStorm\Deprecated; use JetBrains\PhpStorm\ExpectedValues as EV; -use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware as TypeAware; +use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware as LanguageAware; use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable as ElementAvailable; use JetBrains\PhpStorm\Internal\TentativeType; use JetBrains\PhpStorm\Pure; @@ -248,7 +248,7 @@ class Collator * @param string $locale */ #[Pure] - public function __construct(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {} + public function __construct(#[LanguageAware(['8.0' => 'string'], default: '')] $locale) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -264,7 +264,7 @@ public function __construct(#[TypeAware(['8.0' => 'string'], default: '')] $loca * on error. */ #[TentativeType] - public static function create(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?Collator {} + public static function create(#[LanguageAware(['8.0' => 'string'], default: '')] $locale): ?Collator {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -298,8 +298,8 @@ public static function create(#[TypeAware(['8.0' => 'string'], default: '')] $lo #[Pure] #[TentativeType] public function compare( - #[TypeAware(['8.0' => 'string'], default: '')] $string1, - #[TypeAware(['8.0' => 'string'], default: '')] $string2 + #[LanguageAware(['8.0' => 'string'], default: '')] $string1, + #[LanguageAware(['8.0' => 'string'], default: '')] $string2 ): int|false {} /** @@ -321,7 +321,7 @@ public function compare( #[TentativeType] public function sort( array &$array, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null ): bool {} /** @@ -352,7 +352,7 @@ public function sortWithSortKeys( #[TentativeType] public function asort( array &$array, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null ): bool {} /** @@ -366,7 +366,7 @@ public function asort( */ #[Pure] #[TentativeType] - public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): int|false {} + public function getAttribute(#[LanguageAware(['8.0' => 'int'], default: '')] $attribute): int|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -380,8 +380,8 @@ public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attrib */ #[TentativeType] public function setAttribute( - #[TypeAware(['8.0' => 'int'], default: '')] $attribute, - #[TypeAware(['8.0' => 'int'], default: '')] $value + #[LanguageAware(['8.0' => 'int'], default: '')] $attribute, + #[LanguageAware(['8.0' => 'int'], default: '')] $value ): bool {} /** @@ -405,7 +405,7 @@ public function getStrength(): int {} *

* @return bool TRUE on success or FALSE on failure. */ - public function setStrength(#[TypeAware(['8.0' => 'int'], default: '')] #[EV([Collator::PRIMARY])] $strength) {} + public function setStrength(#[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Collator::PRIMARY])] $strength) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -434,7 +434,7 @@ public function getErrorCode(): int|false {} #[Pure] #[TentativeType] public function getLocale( - #[TypeAware(['8.0' => 'int'], default: '')] + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type ): string|false {} @@ -461,7 +461,7 @@ public function getErrorMessage(): string|false {} #[Pure] #[TentativeType] public function getSortKey( - #[TypeAware(['8.0' => 'string'], default: '')] $string, + #[LanguageAware(['8.0' => 'string'], default: '')] $string, #[ElementAvailable(from: '5.3', to: '5.6')] $arg2 ): string|false {} } @@ -925,13 +925,13 @@ class NumberFormatter */ #[Pure] public function __construct( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY, NumberFormatter::PERCENT, NumberFormatter::SCIENTIFIC, NumberFormatter::SPELLOUT, NumberFormatter::ORDINAL, NumberFormatter::DURATION, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY_ACCOUNTING, NumberFormatter::DEFAULT_STYLE, NumberFormatter::IGNORE])] $style, - #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null + #[LanguageAware(['8.0' => 'string|null'], default: '')] $pattern = null ) {} /** @@ -960,13 +960,13 @@ public function __construct( */ #[TentativeType] public static function create( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([NumberFormatter::PATTERN_DECIMAL, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY, NumberFormatter::PERCENT, NumberFormatter::SCIENTIFIC, NumberFormatter::SPELLOUT, NumberFormatter::ORDINAL, NumberFormatter::DURATION, NumberFormatter::PATTERN_RULEBASED, NumberFormatter::CURRENCY_ACCOUNTING, NumberFormatter::DEFAULT_STYLE, NumberFormatter::IGNORE])] $style, - #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = null + #[LanguageAware(['8.0' => 'string|null'], default: '')] $pattern = null ): ?NumberFormatter {} /** @@ -986,8 +986,8 @@ public static function create( #[Pure] #[TentativeType] public function format( - #[TypeAware(['8.0' => 'int|float'], default: '')] $num, - #[TypeAware(['8.0' => 'int'], default: '')] $type = null + #[LanguageAware(['8.0' => 'int|float'], default: '')] $num, + #[LanguageAware(['8.0' => 'int'], default: '')] $type = null ): string|false {} /** @@ -1008,8 +1008,8 @@ public function format( */ #[TentativeType] public function parse( - #[TypeAware(['8.0' => 'string'], default: '')] $string, - #[TypeAware(['8.0' => 'int'], default: '')] $type = NumberFormatter::TYPE_DOUBLE, + #[LanguageAware(['8.0' => 'string'], default: '')] $string, + #[LanguageAware(['8.0' => 'int'], default: '')] $type = NumberFormatter::TYPE_DOUBLE, &$offset = null ): int|float|false {} @@ -1028,8 +1028,8 @@ public function parse( #[Pure] #[TentativeType] public function formatCurrency( - #[TypeAware(['8.0' => 'float'], default: '')] $amount, - #[TypeAware(['8.0' => 'string'], default: '')] $currency + #[LanguageAware(['8.0' => 'float'], default: '')] $amount, + #[LanguageAware(['8.0' => 'string'], default: '')] $currency ): string|false {} /** @@ -1048,7 +1048,7 @@ public function formatCurrency( * @return float|false The parsed numeric value or FALSE on error. */ #[TentativeType] - public function parseCurrency(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$currency, &$offset = null): float|false {} + public function parseCurrency(#[LanguageAware(['8.0' => 'string'], default: '')] $string, &$currency, &$offset = null): float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1065,8 +1065,8 @@ public function parseCurrency(#[TypeAware(['8.0' => 'string'], default: '')] $st */ #[TentativeType] public function setAttribute( - #[TypeAware(['8.0' => 'int'], default: '')] $attribute, - #[TypeAware(['8.0' => 'int|float'], default: '')] $value + #[LanguageAware(['8.0' => 'int'], default: '')] $attribute, + #[LanguageAware(['8.0' => 'int|float'], default: '')] $value ): bool {} /** @@ -1081,7 +1081,7 @@ public function setAttribute( */ #[Pure] #[TentativeType] - public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): int|float|false {} + public function getAttribute(#[LanguageAware(['8.0' => 'int'], default: '')] $attribute): int|float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1099,8 +1099,8 @@ public function getAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attrib */ #[TentativeType] public function setTextAttribute( - #[TypeAware(['8.0' => 'int'], default: '')] $attribute, - #[TypeAware(['8.0' => 'string'], default: '')] $value + #[LanguageAware(['8.0' => 'int'], default: '')] $attribute, + #[LanguageAware(['8.0' => 'string'], default: '')] $value ): bool {} /** @@ -1115,7 +1115,7 @@ public function setTextAttribute( */ #[Pure] #[TentativeType] - public function getTextAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $attribute): string|false {} + public function getTextAttribute(#[LanguageAware(['8.0' => 'int'], default: '')] $attribute): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1132,8 +1132,8 @@ public function getTextAttribute(#[TypeAware(['8.0' => 'int'], default: '')] $at */ #[TentativeType] public function setSymbol( - #[TypeAware(['8.0' => 'int'], default: '')] $symbol, - #[TypeAware(['8.0' => 'string'], default: '')] $value + #[LanguageAware(['8.0' => 'int'], default: '')] $symbol, + #[LanguageAware(['8.0' => 'string'], default: '')] $value ): bool {} /** @@ -1148,7 +1148,7 @@ public function setSymbol( */ #[Pure] #[TentativeType] - public function getSymbol(#[TypeAware(['8.0' => 'int'], default: '')] $symbol): string|false {} + public function getSymbol(#[LanguageAware(['8.0' => 'int'], default: '')] $symbol): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1162,7 +1162,7 @@ public function getSymbol(#[TypeAware(['8.0' => 'int'], default: '')] $symbol): * @return bool TRUE on success or FALSE on failure. */ #[TentativeType] - public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {} + public function setPattern(#[LanguageAware(['8.0' => 'string'], default: '')] $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1189,7 +1189,7 @@ public function getPattern(): string|false {} #[Pure] #[TentativeType] public function getLocale( - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null ): string|false {} /** @@ -1271,9 +1271,9 @@ class Normalizer */ #[TentativeType] public static function normalize( - #[TypeAware(['8.0' => 'string'], default: '')] $string, + #[LanguageAware(['8.0' => 'string'], default: '')] $string, #[ElementAvailable(from: '5.3', to: '5.6')] $form, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C, + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C, #[ElementAvailable(from: '5.3', to: '5.6')] $arg3 ): string|false {} @@ -1289,9 +1289,9 @@ public static function normalize( */ #[TentativeType] public static function isNormalized( - #[TypeAware(['8.0' => 'string'], default: '')] $string, + #[LanguageAware(['8.0' => 'string'], default: '')] $string, #[ElementAvailable(from: '5.3', to: '5.6')] $form, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C, + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C, #[ElementAvailable(from: '5.3', to: '5.6')] $arg3 ): bool {} @@ -1392,7 +1392,7 @@ public static function getDefault(): string {} *

* @return bool TRUE on success or FALSE on failure. */ - public static function setDefault(#[TypeAware(['8.0' => 'string'], default: '')] $locale) {} + public static function setDefault(#[LanguageAware(['8.0' => 'string'], default: '')] $locale) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1404,7 +1404,7 @@ public static function setDefault(#[TypeAware(['8.0' => 'string'], default: '')] * @return string|null The language code associated with the language or NULL in case of error. */ #[TentativeType] - public static function getPrimaryLanguage(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {} + public static function getPrimaryLanguage(#[LanguageAware(['8.0' => 'string'], default: '')] $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1416,7 +1416,7 @@ public static function getPrimaryLanguage(#[TypeAware(['8.0' => 'string'], defau * @return string|null The script subtag for the locale or NULL if not present */ #[TentativeType] - public static function getScript(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {} + public static function getScript(#[LanguageAware(['8.0' => 'string'], default: '')] $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1428,7 +1428,7 @@ public static function getScript(#[TypeAware(['8.0' => 'string'], default: '')] * @return string|null The region subtag for the locale or NULL if not present */ #[TentativeType] - public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {} + public static function getRegion(#[LanguageAware(['8.0' => 'string'], default: '')] $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1440,7 +1440,7 @@ public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] * @return array|false|null Associative array containing the keyword-value pairs for this locale */ #[TentativeType] - public static function getKeywords(#[TypeAware(['8.0' => 'string'], default: '')] $locale): array|false|null {} + public static function getKeywords(#[LanguageAware(['8.0' => 'string'], default: '')] $locale): array|false|null {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1457,9 +1457,9 @@ public static function getKeywords(#[TypeAware(['8.0' => 'string'], default: '') */ #[TentativeType] public static function getDisplayScript( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1477,9 +1477,9 @@ public static function getDisplayScript( */ #[TentativeType] public static function getDisplayRegion( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1494,9 +1494,9 @@ public static function getDisplayRegion( */ #[TentativeType] public static function getDisplayName( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1514,9 +1514,9 @@ public static function getDisplayName( */ #[TentativeType] public static function getDisplayLanguage( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1534,9 +1534,9 @@ public static function getDisplayLanguage( */ #[TentativeType] public static function getDisplayVariant( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1583,7 +1583,7 @@ public static function composeLocale(array $subtags): string|false {} * variant2=>varZ */ #[TentativeType] - public static function parseLocale(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?array {} + public static function parseLocale(#[LanguageAware(['8.0' => 'string'], default: '')] $locale): ?array {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1596,7 +1596,7 @@ public static function parseLocale(#[TypeAware(['8.0' => 'string'], default: '') * or NULL if not present */ #[TentativeType] - public static function getAllVariants(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?array {} + public static function getAllVariants(#[LanguageAware(['8.0' => 'string'], default: '')] $locale): ?array {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1616,10 +1616,10 @@ public static function getAllVariants(#[TypeAware(['8.0' => 'string'], default: */ #[TentativeType] public static function filterMatches( - #[TypeAware(['8.0' => 'string'], default: '')] $languageTag, - #[TypeAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $languageTag, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, #[ElementAvailable(from: '5.3', to: '5.6')] $canonicalize, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'bool'], default: '')] $canonicalize = false ): ?bool {} /** @@ -1645,11 +1645,11 @@ public static function filterMatches( #[TentativeType] public static function lookup( array $languageTag, - #[TypeAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, #[ElementAvailable(from: '5.3', to: '5.6')] $canonicalize, #[ElementAvailable(from: '5.3', to: '5.6')] $defaultLocale, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false, - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'bool'], default: '')] $canonicalize = false, + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null ): ?string {} /** @@ -1658,7 +1658,7 @@ public static function lookup( * @return string|null */ #[TentativeType] - public static function canonicalize(#[TypeAware(['8.0' => 'string'], default: '')] $locale): ?string {} + public static function canonicalize(#[LanguageAware(['8.0' => 'string'], default: '')] $locale): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1670,7 +1670,7 @@ public static function canonicalize(#[TypeAware(['8.0' => 'string'], default: '' * @return string|false The corresponding locale identifier. */ #[TentativeType] - public static function acceptFromHttp(#[TypeAware(['8.0' => 'string'], default: '')] $header): string|false {} + public static function acceptFromHttp(#[LanguageAware(['8.0' => 'string'], default: '')] $header): string|false {} } class MessageFormatter @@ -1692,8 +1692,8 @@ class MessageFormatter */ #[Pure] public function __construct( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string'], default: '')] $pattern + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $pattern ) {} /** @@ -1713,8 +1713,8 @@ public function __construct( */ #[TentativeType] public static function create( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string'], default: '')] $pattern + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $pattern ): ?MessageFormatter {} /** @@ -1750,8 +1750,8 @@ public function format(array $values): string|false {} */ #[TentativeType] public static function formatMessage( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string'], default: '')] $pattern, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $pattern, array $values ): string|false {} @@ -1766,7 +1766,7 @@ public static function formatMessage( */ #[Pure] #[TentativeType] - public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string): array|false {} + public function parse(#[LanguageAware(['8.0' => 'string'], default: '')] $string): array|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1785,9 +1785,9 @@ public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string): a */ #[TentativeType] public static function parseMessage( - #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string'], default: '')] $pattern, - #[TypeAware(['8.0' => 'string'], default: '')] $message + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string'], default: '')] $pattern, + #[LanguageAware(['8.0' => 'string'], default: '')] $message ): array|false {} /** @@ -1803,7 +1803,7 @@ public static function parseMessage( * @return bool TRUE on success or FALSE on failure. */ #[TentativeType] - public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {} + public function setPattern(#[LanguageAware(['8.0' => 'string'], default: '')] $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -1904,14 +1904,14 @@ class IntlDateFormatter */ #[Pure] public function __construct( - #[TypeAware(['8.0' => 'string|null'], default: '')] $locale, - #[ElementAvailable(from: '5.3', to: '8.0')] #[TypeAware(['8.0' => 'int'], default: '')] $dateType, - #[ElementAvailable(from: '5.3', to: '8.0')] #[TypeAware(['8.0' => 'int'], default: '')] $timeType, + #[LanguageAware(['8.0' => 'string|null'], default: '')] $locale, + #[ElementAvailable(from: '5.3', to: '8.0')] #[LanguageAware(['8.0' => 'int'], default: '')] $dateType, + #[ElementAvailable(from: '5.3', to: '8.0')] #[LanguageAware(['8.0' => 'int'], default: '')] $timeType, #[ElementAvailable(from: '8.1')] int $dateType = 0, #[ElementAvailable(from: '8.1')] int $timeType = 0, $timezone = null, $calendar = null, - #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = '' + #[LanguageAware(['8.0' => 'string|null'], default: '')] $pattern = '' ) {} /** @@ -1951,14 +1951,14 @@ public function __construct( */ #[TentativeType] public static function create( - #[TypeAware(['8.0' => 'string|null'], default: '')] $locale, - #[ElementAvailable(from: '5.3', to: '8.0')] #[TypeAware(['8.0' => 'int'], default: '')] $dateType, - #[ElementAvailable(from: '5.3', to: '8.0')] #[TypeAware(['8.0' => 'int'], default: '')] $timeType, + #[LanguageAware(['8.0' => 'string|null'], default: '')] $locale, + #[ElementAvailable(from: '5.3', to: '8.0')] #[LanguageAware(['8.0' => 'int'], default: '')] $dateType, + #[ElementAvailable(from: '5.3', to: '8.0')] #[LanguageAware(['8.0' => 'int'], default: '')] $timeType, #[ElementAvailable(from: '8.1')] int $dateType = 0, #[ElementAvailable(from: '8.1')] int $timeType = 0, $timezone = null, - #[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar = null, - #[TypeAware(['8.0' => 'string|null'], default: '')] $pattern = '' + #[LanguageAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar = null, + #[LanguageAware(['8.0' => 'string|null'], default: '')] $pattern = '' ): ?IntlDateFormatter {} /** @@ -2002,7 +2002,7 @@ public function getCalendar(): int|false {} * @return bool TRUE on success or FALSE on failure. */ #[TentativeType] - public function setCalendar(#[TypeAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar): bool {} + public function setCalendar(#[LanguageAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2088,7 +2088,8 @@ public function setTimeZoneId($zone) {} * @return bool|null TRUE on success or FALSE on failure. */ #[TentativeType] - public function setTimeZone($timezone): ?bool {} + #[LanguageAware(['8.3' => 'bool'], default: 'bool|null')] + public function setTimeZone($timezone) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2102,7 +2103,7 @@ public function setTimeZone($timezone): ?bool {} * Bad formatstrings are usually the cause of the failure. */ #[TentativeType] - public function setPattern(#[TypeAware(['8.0' => 'string'], default: '')] $pattern): bool {} + public function setPattern(#[LanguageAware(['8.0' => 'string'], default: '')] $pattern): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2125,7 +2126,7 @@ public function getPattern(): string|false {} #[TentativeType] public function getLocale( #[ElementAvailable(from: '8.0')] - #[TypeAware(['8.0' => 'int'], default: '')] + #[LanguageAware(['8.0' => 'int'], default: '')] $type = null ): string|false {} @@ -2139,7 +2140,7 @@ public function getLocale( * @return void */ #[TentativeType] - public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient): void {} + public function setLenient(#[LanguageAware(['8.0' => 'bool'], default: '')] $lenient): void {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2195,7 +2196,7 @@ public function format( * @return string|false A string with result or FALSE on failure. */ #[TentativeType] - public static function formatObject($datetime, $format = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): string|false {} + public static function formatObject($datetime, $format = null, #[LanguageAware(['8.0' => 'string|null'], default: '')] $locale = null): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2214,7 +2215,7 @@ public static function formatObject($datetime, $format = null, #[TypeAware(['8.0 * @return int|float|false timestamp parsed value */ #[TentativeType] - public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null): int|float|false {} + public function parse(#[LanguageAware(['8.0' => 'string'], default: '')] $string, &$offset = null): int|float|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2232,7 +2233,7 @@ public function parse(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$ * @return array|false Localtime compatible array of integers : contains 24 hour clock value in tm_hour field */ #[TentativeType] - public function localtime(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$offset = null): array|false {} + public function localtime(#[LanguageAware(['8.0' => 'string'], default: '')] $string, &$offset = null): array|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -2265,9 +2266,9 @@ class ResourceBundle implements IteratorAggregate, Countable */ #[Pure] public function __construct( - #[TypeAware(['8.0' => 'string|null'], default: '')] $locale, - #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle, - #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true + #[LanguageAware(['8.0' => 'string|null'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string|null'], default: '')] $bundle, + #[LanguageAware(['8.0' => 'bool'], default: '')] $fallback = true ) {} /** @@ -2287,9 +2288,9 @@ public function __construct( */ #[TentativeType] public static function create( - #[TypeAware(['8.0' => 'string|null'], default: '')] $locale, - #[TypeAware(['8.0' => 'string|null'], default: '')] $bundle, - #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true + #[LanguageAware(['8.0' => 'string|null'], default: '')] $locale, + #[LanguageAware(['8.0' => 'string|null'], default: '')] $bundle, + #[LanguageAware(['8.0' => 'bool'], default: '')] $fallback = true ): ?ResourceBundle {} /** @@ -2306,7 +2307,7 @@ public static function create( */ #[Pure] #[TentativeType] - public function get($index, #[TypeAware(['8.0' => 'bool'], default: '')] $fallback = true): mixed {} + public function get($index, #[LanguageAware(['8.0' => 'bool'], default: '')] $fallback = true): mixed {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)
@@ -2329,7 +2330,7 @@ public function count(): int {} * @return array|false the list of locales supported by the bundle. */ #[TentativeType] - public static function getLocales(#[TypeAware(['8.0' => 'string'], default: '')] $bundle): array|false {} + public static function getLocales(#[LanguageAware(['8.0' => 'string'], default: '')] $bundle): array|false {} /** * (PHP >= 5.3.2, PECL intl >= 2.0.0)
@@ -2370,8 +2371,8 @@ class Transliterator /** * Starting 8.2 $id is readonly to unlock subclassing it */ - #[TypeAware(['8.1' => 'string'], default: '')] - public $id; + #[LanguageAware(['8.1' => 'string'], default: '')] + public readonly string $id; /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)
@@ -2398,8 +2399,8 @@ final private function __construct() {} */ #[TentativeType] public static function create( - #[TypeAware(['8.0' => 'string'], default: '')] $id, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null + #[LanguageAware(['8.0' => 'string'], default: '')] $id, + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null ): ?Transliterator {} /** @@ -2420,8 +2421,8 @@ public static function create( */ #[TentativeType] public static function createFromRules( - #[TypeAware(['8.0' => 'string'], default: '')] $rules, - #[TypeAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null + #[LanguageAware(['8.0' => 'string'], default: '')] $rules, + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null ): ?Transliterator {} /** @@ -2467,9 +2468,9 @@ public static function listIDs(): array|false {} #[Pure] #[TentativeType] public function transliterate( - #[TypeAware(['8.0' => 'string'], default: '')] $string, - #[TypeAware(['8.0' => 'int'], default: '')] $start = null, - #[TypeAware(['8.0' => 'int'], default: '')] $end = -1 + #[LanguageAware(['8.0' => 'string'], default: '')] $string, + #[LanguageAware(['8.0' => 'int'], default: '')] $start = null, + #[LanguageAware(['8.0' => 'int'], default: '')] $end = -1 ): string|false {} /** @@ -2513,6 +2514,8 @@ class Spoofchecker public const MINIMALLY_RESTRICTIVE = 1342177280; public const UNRESTRICTIVE = 1610612736; public const SINGLE_SCRIPT_RESTRICTIVE = 536870912; + public const MIXED_NUMBERS = 1; + public const HIDDEN_OVERLAY = 2; /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)
@@ -2533,7 +2536,7 @@ public function __construct() {} * @return bool */ #[TentativeType] - public function isSuspicious(#[TypeAware(['8.0' => 'string'], default: '')] $string, &$errorCode = null): bool {} + public function isSuspicious(#[LanguageAware(['8.0' => 'string'], default: '')] $string, &$errorCode = null): bool {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)
@@ -2549,8 +2552,8 @@ public function isSuspicious(#[TypeAware(['8.0' => 'string'], default: '')] $str */ #[TentativeType] public function areConfusable( - #[TypeAware(['8.0' => 'string'], default: '')] $string1, - #[TypeAware(['8.0' => 'string'], default: '')] $string2, + #[LanguageAware(['8.0' => 'string'], default: '')] $string1, + #[LanguageAware(['8.0' => 'string'], default: '')] $string2, &$errorCode = null ): bool {} @@ -2563,7 +2566,7 @@ public function areConfusable( * @return void */ #[TentativeType] - public function setAllowedLocales(#[TypeAware(['8.0' => 'string'], default: '')] $locales): void {} + public function setAllowedLocales(#[LanguageAware(['8.0' => 'string'], default: '')] $locales): void {} /** * (PHP >= 5.4.0, PECL intl >= 2.0.0)
@@ -2574,7 +2577,7 @@ public function setAllowedLocales(#[TypeAware(['8.0' => 'string'], default: '')] * @return void */ #[TentativeType] - public function setChecks(#[TypeAware(['8.0' => 'int'], default: '')] $checks): void {} + public function setChecks(#[LanguageAware(['8.0' => 'int'], default: '')] $checks): void {} #[TentativeType] public function setRestrictionLevel(int $level): void {} @@ -2608,7 +2611,7 @@ public static function createInstance($timeZone = null, $locale = null) {} * @param float $timestamp */ #[TentativeType] - public function setGregorianChange(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp): bool {} + public function setGregorianChange(#[LanguageAware(['8.0' => 'float'], default: '')] $timestamp): bool {} /** * @return float @@ -2623,7 +2626,17 @@ public function getGregorianChange(): float {} */ #[Pure] #[TentativeType] - public function isLeapYear(#[TypeAware(['8.0' => 'int'], default: '')] $year): bool {} + public function isLeapYear(#[LanguageAware(['8.0' => 'int'], default: '')] $year): bool {} + + /** + * @since 8.3 + */ + public static function createFromDate(int $year, int $month, int $dayOfMonth): static {} + + /** + * @since 8.3 + */ + public static function createFromDateTime(int $year, int $month, int $dayOfMonth, int $hour, int $minute, ?int $second = null): static {} } /** @@ -2689,8 +2702,8 @@ class IntlCalendar */ #[TentativeType] public function add( - #[TypeAware(['8.0' => 'int'], default: '')] $field, - #[TypeAware(['8.0' => 'int'], default: '')] $value + #[LanguageAware(['8.0' => 'int'], default: '')] $field, + #[LanguageAware(['8.0' => 'int'], default: '')] $value ): bool {} /** @@ -2734,7 +2747,7 @@ public function before(IntlCalendar $other): bool {} *

* @return bool Returns TRUE on success or FALSE on failure. Failure can only occur is invalid arguments are provided. */ - public function clear(#[TypeAware(['8.0' => 'int|null'], default: '')] $field = null) {} + public function clear(#[LanguageAware(['8.0' => 'int|null'], default: '')] $field = null) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2789,7 +2802,7 @@ private function __construct() {} * failure. */ #[TentativeType] - public static function createInstance($timezone = null, #[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): ?IntlCalendar {} + public static function createInstance($timezone = null, #[LanguageAware(['8.0' => 'string|null'], default: '')] $locale = null): ?IntlCalendar {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2806,7 +2819,7 @@ public static function createInstance($timezone = null, #[TypeAware(['8.0' => 's */ #[Pure] #[TentativeType] - public function equals(#[TypeAware(['8.0' => 'IntlCalendar'], default: '')] $other): bool {} + public function equals(#[LanguageAware(['8.0' => 'IntlCalendar'], default: '')] $other): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2833,8 +2846,8 @@ public function equals(#[TypeAware(['8.0' => 'IntlCalendar'], default: '')] $oth #[Pure] #[TentativeType] public function fieldDifference( - #[TypeAware(['8.0' => 'float'], default: '')] $timestamp, - #[TypeAware(['8.0' => 'int'], default: '')] $field + #[LanguageAware(['8.0' => 'float'], default: '')] $timestamp, + #[LanguageAware(['8.0' => 'int'], default: '')] $field ): int|false {} /** @@ -2853,8 +2866,8 @@ public function fieldDifference( */ #[TentativeType] public static function fromDateTime( - #[TypeAware(['8.0' => 'DateTime|string'], default: '')] $datetime, - #[TypeAware(['8.0' => 'string|null'], default: '')] #[ElementAvailable(from: '8.0')] $locale + #[LanguageAware(['8.0' => 'DateTime|string'], default: '')] $datetime, + #[LanguageAware(['8.0' => 'string|null'], default: '')] #[ElementAvailable(from: '8.0')] $locale ): ?IntlCalendar {} /** @@ -2870,7 +2883,7 @@ public static function fromDateTime( */ #[Pure] #[TentativeType] - public function get(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {} + public function get(#[LanguageAware(['8.0' => 'int'], default: '')] $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2887,7 +2900,7 @@ public function get(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|fal */ #[Pure] #[TentativeType] - public function getActualMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {} + public function getActualMaximum(#[LanguageAware(['8.0' => 'int'], default: '')] $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2904,7 +2917,7 @@ public function getActualMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $fi */ #[Pure] #[TentativeType] - public function getActualMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {} + public function getActualMinimum(#[LanguageAware(['8.0' => 'int'], default: '')] $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2932,7 +2945,7 @@ public static function getAvailableLocales(): array {} */ #[Pure] #[TentativeType] - public function getDayOfWeekType(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek): int|false {} + public function getDayOfWeekType(#[LanguageAware(['8.0' => 'int'], default: '')] $dayOfWeek): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -2981,7 +2994,7 @@ public function getFirstDayOfWeek(): int|false {} */ #[Pure] #[TentativeType] - public function getGreatestMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {} + public function getGreatestMinimum(#[LanguageAware(['8.0' => 'int'], default: '')] $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3001,9 +3014,9 @@ public function getGreatestMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $ */ #[TentativeType] public static function getKeywordValuesForLocale( - #[TypeAware(['8.0' => 'string'], default: '')] $keyword, - #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'bool'], default: '')] $onlyCommon + #[LanguageAware(['8.0' => 'string'], default: '')] $keyword, + #[LanguageAware(['8.0' => 'string'], default: '')] $locale, + #[LanguageAware(['8.0' => 'bool'], default: '')] $onlyCommon ): IntlIterator|false {} /** @@ -3021,7 +3034,7 @@ public static function getKeywordValuesForLocale( */ #[Pure] #[TentativeType] - public function getLeastMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {} + public function getLeastMaximum(#[LanguageAware(['8.0' => 'int'], default: '')] $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3039,7 +3052,7 @@ public function getLeastMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $fie */ #[Pure] #[TentativeType] - public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type): string|false {} + public function getLocale(#[LanguageAware(['8.0' => 'int'], default: '')] $type): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3054,7 +3067,7 @@ public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type): st */ #[Pure] #[TentativeType] - public function getMaximum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {} + public function getMaximum(#[LanguageAware(['8.0' => 'int'], default: '')] $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3081,7 +3094,7 @@ public function getMinimalDaysInFirstWeek(): int|false {} */ #[Pure] #[TentativeType] - public function getMinimum(#[TypeAware(['8.0' => 'int'], default: '')] $field): int|false {} + public function getMinimum(#[LanguageAware(['8.0' => 'int'], default: '')] $field): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3166,7 +3179,7 @@ public function getType(): string {} */ #[Pure] #[TentativeType] - public function getWeekendTransition(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek): int|false {} + public function getWeekendTransition(#[LanguageAware(['8.0' => 'int'], default: '')] $dayOfWeek): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3225,7 +3238,7 @@ public function isLenient(): bool {} */ #[Pure] #[TentativeType] - public function isWeekend(#[TypeAware(['8.0' => 'float|null'], default: '')] $timestamp = null): bool {} + public function isWeekend(#[LanguageAware(['8.0' => 'float|null'], default: '')] $timestamp = null): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3245,7 +3258,7 @@ public function isWeekend(#[TypeAware(['8.0' => 'float|null'], default: '')] $ti * @return bool Returns TRUE on success or FALSE on failure. */ #[TentativeType] - public function roll(#[TypeAware(['8.0' => 'int'], default: '')] $field, $value): bool {} + public function roll(#[LanguageAware(['8.0' => 'int'], default: '')] $field, $value): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3260,7 +3273,7 @@ public function roll(#[TypeAware(['8.0' => 'int'], default: '')] $field, $value) * @return bool Assuming there are no argument errors, returns TRUE iif the field is set. */ #[TentativeType] - public function PS_UNRESERVE_PREFIX_isSet(#[TypeAware(['8.0' => 'int'], default: '')] $field): bool {} + public function PS_UNRESERVE_PREFIX_isSet(#[LanguageAware(['8.0' => 'int'], default: '')] $field): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3317,7 +3330,7 @@ public function set($field, $value) {} *

* @return bool Returns TRUE on success. Failure can only happen due to invalid parameters. */ - public function setFirstDayOfWeek(#[TypeAware(['8.0' => 'int'], default: '')] $dayOfWeek) {} + public function setFirstDayOfWeek(#[LanguageAware(['8.0' => 'int'], default: '')] $dayOfWeek) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3328,7 +3341,7 @@ public function setFirstDayOfWeek(#[TypeAware(['8.0' => 'int'], default: '')] $d *

* @return bool Returns TRUE on success. Failure can only happen due to invalid parameters. */ - public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient) {} + public function setLenient(#[LanguageAware(['8.0' => 'bool'], default: '')] $lenient) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3341,7 +3354,7 @@ public function setLenient(#[TypeAware(['8.0' => 'bool'], default: '')] $lenient * @return bool * Returns TRUE on success. Failure can only happen due to invalid parameters. */ - public function setRepeatedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {} + public function setRepeatedWallTimeOption(#[LanguageAware(['8.0' => 'int'], default: '')] $option) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3357,7 +3370,7 @@ public function setRepeatedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: * Returns TRUE on success. Failure can only happen due to invalid parameters. *

*/ - public function setSkippedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: '')] $option) {} + public function setSkippedWallTimeOption(#[LanguageAware(['8.0' => 'int'], default: '')] $option) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3371,7 +3384,7 @@ public function setSkippedWallTimeOption(#[TypeAware(['8.0' => 'int'], default: * Returns TRUE on success and FALSE on failure. */ #[TentativeType] - public function setTime(#[TypeAware(['8.0' => 'float'], default: '')] $timestamp): bool {} + public function setTime(#[LanguageAware(['8.0' => 'float'], default: '')] $timestamp): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3434,7 +3447,17 @@ public function toDateTime(): DateTime|false {} * @param int $days * @return bool */ - public function setMinimalDaysInFirstWeek(#[TypeAware(['8.0' => 'int'], default: '')] $days) {} + public function setMinimalDaysInFirstWeek(#[LanguageAware(['8.0' => 'int'], default: '')] $days) {} + + /** + * @since 8.3 + */ + public function setDate(int $year, int $month, int $dayOfMonth): void {} + + /** + * @since 8.3 + */ + public function setDateTime(int $year, int $month, int $dayOfMonth, int $hour, int $minute, ?int $second = null): void {} } /** @@ -3493,7 +3516,7 @@ private function __construct() {} * @return int|false number of IDs or FALSE on failure */ #[TentativeType] - public static function countEquivalentIDs(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): int|false {} + public static function countEquivalentIDs(#[LanguageAware(['8.0' => 'string'], default: '')] $timezoneId): int|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3522,7 +3545,7 @@ public static function createEnumeration($countryOrRawOffset): IntlIterator|fals * @return IntlTimeZone|null a timezone object or NULL on failure */ #[TentativeType] - public static function createTimeZone(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): ?IntlTimeZone {} + public static function createTimeZone(#[LanguageAware(['8.0' => 'string'], default: '')] $timezoneId): ?IntlTimeZone {} /** * (PHP 5 >=5.5.0)
@@ -3535,9 +3558,9 @@ public static function createTimeZone(#[TypeAware(['8.0' => 'string'], default: */ #[TentativeType] public static function createTimeZoneIDEnumeration( - #[TypeAware(['8.0' => 'int'], default: '')] $type, - #[TypeAware(['8.0' => 'string|null'], default: '')] $region = null, - #[TypeAware(['8.0' => 'int|null'], default: '')] $rawOffset = 0 + #[LanguageAware(['8.0' => 'int'], default: '')] $type, + #[LanguageAware(['8.0' => 'string|null'], default: '')] $region = null, + #[LanguageAware(['8.0' => 'int|null'], default: '')] $rawOffset = 0 ): IntlIterator|false {} /** @@ -3548,7 +3571,7 @@ public static function createTimeZoneIDEnumeration( * @return IntlTimeZone|null a timezone object or NULL on failure */ #[TentativeType] - public static function fromDateTimeZone(#[TypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): ?IntlTimeZone {} + public static function fromDateTimeZone(#[LanguageAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): ?IntlTimeZone {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3559,7 +3582,7 @@ public static function fromDateTimeZone(#[TypeAware(['8.0' => 'DateTimeZone'], d * @return string|false the timezone ID or FALSE on failure */ #[TentativeType] - public static function getCanonicalID(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId, &$isSystemId): string|false {} + public static function getCanonicalID(#[LanguageAware(['8.0' => 'string'], default: '')] $timezoneId, &$isSystemId): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3572,9 +3595,9 @@ public static function getCanonicalID(#[TypeAware(['8.0' => 'string'], default: #[Pure] #[TentativeType] public function getDisplayName( - #[TypeAware(['8.0' => 'bool'], default: '')] $dst = false, - #[TypeAware(['8.0' => 'int'], default: '')] $style = 2, - #[TypeAware(['8.0' => 'string|null'], default: '')] $locale + #[LanguageAware(['8.0' => 'bool'], default: '')] $dst = false, + #[LanguageAware(['8.0' => 'int'], default: '')] $style = 2, + #[LanguageAware(['8.0' => 'string|null'], default: '')] $locale ): string|false {} /** @@ -3597,8 +3620,8 @@ public function getDSTSavings(): int {} */ #[TentativeType] public static function getEquivalentID( - #[TypeAware(['8.0' => 'string'], default: '')] $timezoneId, - #[TypeAware(['8.0' => 'int'], default: '')] $offset + #[LanguageAware(['8.0' => 'string'], default: '')] $timezoneId, + #[LanguageAware(['8.0' => 'int'], default: '')] $offset ): string|false {} /** @@ -3661,8 +3684,8 @@ public function getID(): string|false {} */ #[TentativeType] public function getOffset( - #[TypeAware(['8.0' => 'float'], default: '')] $timestamp, - #[TypeAware(['8.0' => 'bool'], default: '')] $local, + #[LanguageAware(['8.0' => 'float'], default: '')] $timestamp, + #[LanguageAware(['8.0' => 'bool'], default: '')] $local, &$rawOffset, &$dstOffset ): bool {} @@ -3685,7 +3708,7 @@ public function getRawOffset(): int {} * @return string|false region or FALSE on failure */ #[TentativeType] - public static function getRegion(#[TypeAware(['8.0' => 'string'], default: '')] $timezoneId): string|false {} + public static function getRegion(#[LanguageAware(['8.0' => 'string'], default: '')] $timezoneId): string|false {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -3985,7 +4008,7 @@ function collator_get_sort_key( * @return NumberFormatter|null NumberFormatter object or NULL on error. */ #[Pure] -function numfmt_create(string $locale, int $style, #[TypeAware(['8.0' => 'string|null'], default: 'string')] $pattern = null): ?NumberFormatter {} +function numfmt_create(string $locale, int $style, #[LanguageAware(['8.0' => 'string|null'], default: 'string')] $pattern = null): ?NumberFormatter {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -4707,7 +4730,7 @@ function datefmt_create( #[ElementAvailable(from: '8.1')] int $timeType = 0, $timezone = null, IntlCalendar|int|null $calendar = null, - #[TypeAware(['8.0' => 'string|null'], default: 'string')] $pattern = null + #[LanguageAware(['8.0' => 'string|null'], default: 'string')] $pattern = null ): ?IntlDateFormatter {} /** @@ -4852,7 +4875,8 @@ function datefmt_set_timezone_id(MessageFormatter $mf, $zone) {} *

* @return bool|null TRUE on success or FALSE on failure. */ -function datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): ?bool {} +#[LanguageAware(['8.3' => 'bool'], default: 'bool|null')] +function datefmt_set_timezone(IntlDateFormatter $formatter, $timezone) {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
@@ -4918,8 +4942,8 @@ function datefmt_set_lenient( */ #[Pure] function datefmt_format( - #[TypeAware(['8.0' => 'IntlDateFormatter'], default: '')] #[ElementAvailable(from: '5.3', to: '7.4')] $formatter = null, - #[TypeAware(['8.0' => 'IntlDateFormatter'], default: '')] #[ElementAvailable(from: '8.0')] $formatter, + #[LanguageAware(['8.0' => 'IntlDateFormatter'], default: '')] #[ElementAvailable(from: '5.3', to: '7.4')] $formatter = null, + #[LanguageAware(['8.0' => 'IntlDateFormatter'], default: '')] #[ElementAvailable(from: '8.0')] $formatter, #[ElementAvailable(from: '5.3', to: '7.4')] $datetime = null, #[ElementAvailable(from: '8.0')] $datetime ): string|false {} @@ -5381,7 +5405,7 @@ function intl_get($calendar, $field) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'float|false'], default: 'float')] +#[LanguageAware(['8.0' => 'float|false'], default: 'float')] function intlcal_get_time(IntlCalendar $calendar) {} /** @@ -5538,7 +5562,8 @@ function intlcal_before(IntlCalendar $calendar, IntlCalendar $other): bool {} * @return bool Returns TRUE on success and FALSE on failure. * @since 5.5 */ -function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = null, int $hour = null, int $minute = null, int $second = null): bool {} +#[LanguageAware(['8.3' => 'true'], default: 'bool')] +function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = null, int $hour = null, int $minute = null, int $second = null) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -5583,6 +5608,7 @@ function intlcal_roll( * @return bool Returns TRUE on success or FALSE on failure. Failure can only occur is invalid arguments are provided. * @since 5.5 */ +#[LanguageAware(['8.3' => 'true'], default: 'bool')] function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {} /** @@ -5612,7 +5638,7 @@ function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field) {} /** @@ -5633,7 +5659,7 @@ function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field) {} /** @@ -5654,7 +5680,7 @@ function intlcal_get_actual_maximum(IntlCalendar $calendar, int $field) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field) {} /** @@ -5678,7 +5704,7 @@ function intlcal_get_actual_minimum(IntlCalendar $calendar, int $field) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek) {} /** @@ -5695,7 +5721,7 @@ function intlcal_get_day_of_week_type(IntlCalendar $calendar, int $dayOfWeek) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_first_day_of_week(IntlCalendar $calendar) {} /** @@ -5730,7 +5756,7 @@ function intlcal_greates_minimum($calendar, $field) {} * @return int An integer with the value of the time field. */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get(IntlCalendar $calendar, int $field) {} /** @@ -5752,7 +5778,7 @@ function intlcal_get(IntlCalendar $calendar, int $field) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_least_maximum(IntlCalendar $calendar, int $field) {} /** @@ -5772,7 +5798,7 @@ function intlcal_get_least_maximum(IntlCalendar $calendar, int $field) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field) {} /** @@ -5795,7 +5821,7 @@ function intlcal_get_greatest_minimum(IntlCalendar $calendar, int $field) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'string|false'], default: 'string')] +#[LanguageAware(['8.0' => 'string|false'], default: 'string')] function intlcal_get_locale(IntlCalendar $calendar, int $type) {} /** @@ -5828,7 +5854,7 @@ function intcal_get_maximum($calendar, $field) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar) {} /** @@ -5848,7 +5874,7 @@ function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar) {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_minimum(IntlCalendar $calendar, int $field) {} /** @@ -5899,7 +5925,7 @@ function intlcal_get_type(IntlCalendar $calendar): string {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_weekend_transition(IntlCalendar $calendar, int $dayOfWeek) {} /** @@ -5967,7 +5993,7 @@ function intlcal_is_set(IntlCalendar $calendar, int $field): bool {} * @since 5.5 */ #[Pure] -#[TypeAware(['8.0' => 'int|false'], default: 'int')] +#[LanguageAware(['8.0' => 'int|false'], default: 'int')] function intlcal_get_maximum(IntlCalendar $calendar, int $field) {} /** @@ -6025,7 +6051,8 @@ function intlcal_is_weekend(IntlCalendar $calendar, ?float $timestamp = null): b * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters. * @since 5.5 */ -function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): bool {} +#[LanguageAware(['8.3' => 'true'], default: 'bool')] +function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -6040,7 +6067,8 @@ function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): * @return bool Returns TRUE on success. Failure can only happen due to invalid parameters. * @since 5.5 */ -function intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): bool {} +#[LanguageAware(['8.3' => 'true'], default: 'bool')] +function intlcal_set_lenient(IntlCalendar $calendar, bool $lenient) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -6108,7 +6136,8 @@ function intlcal_get_skipped_wall_time_option(IntlCalendar $calendar): int {} * Returns TRUE on success. Failure can only happen due to invalid parameters. * @since 5.5 */ -function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): bool {} +#[LanguageAware(['8.3' => 'true'], default: 'bool')] +function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -6128,7 +6157,8 @@ function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $opti *

* @since 5.5 */ -function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): bool {} +#[LanguageAware(['8.3' => 'true'], default: 'bool')] +function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a2)
@@ -6750,7 +6780,8 @@ function intltz_get_region(string $timezoneId): string|false {} * * @since 5.5.1 */ -function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool {} +#[LanguageAware(['8.3' => 'true'], default: 'bool')] +function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days) {} function intltz_get_windows_id(string $timezoneId): string|false {} @@ -7084,7 +7115,7 @@ private function __construct() {} * @return IntlBreakIterator|null */ #[TentativeType] - public static function createCharacterInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale = null): ?IntlBreakIterator {} + public static function createCharacterInstance(#[LanguageAware(['8.0' => 'string|null'], default: '')] $locale = null): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)
@@ -7103,7 +7134,7 @@ public static function createCodePointInstance(): IntlCodePointBreakIterator {} * @return IntlBreakIterator|null */ #[TentativeType] - public static function createLineInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {} + public static function createLineInstance(#[LanguageAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)
@@ -7113,7 +7144,7 @@ public static function createLineInstance(#[TypeAware(['8.0' => 'string|null'], * @return IntlBreakIterator|null */ #[TentativeType] - public static function createSentenceInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {} + public static function createSentenceInstance(#[LanguageAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)
@@ -7123,7 +7154,7 @@ public static function createSentenceInstance(#[TypeAware(['8.0' => 'string|null * @return IntlBreakIterator|null */ #[TentativeType] - public static function createTitleInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {} + public static function createTitleInstance(#[LanguageAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)
@@ -7133,7 +7164,7 @@ public static function createTitleInstance(#[TypeAware(['8.0' => 'string|null'], * @return IntlBreakIterator|null */ #[TentativeType] - public static function createWordInstance(#[TypeAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {} + public static function createWordInstance(#[LanguageAware(['8.0' => 'string|null'], default: '')] $locale): ?IntlBreakIterator {} /** * (PHP 5 >=5.5.0)
@@ -7160,7 +7191,7 @@ public function first(): int {} * @param int $offset */ #[TentativeType] - public function following(#[TypeAware(['8.0' => 'int'], default: '')] $offset): int {} + public function following(#[LanguageAware(['8.0' => 'int'], default: '')] $offset): int {} /** * (PHP 5 >=5.5.0)
@@ -7190,7 +7221,7 @@ public function getErrorMessage(): string {} */ #[Pure] #[TentativeType] - public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type): string|false {} + public function getLocale(#[LanguageAware(['8.0' => 'int'], default: '')] $type): string|false {} /** * (PHP 5 >=5.5.0)
@@ -7217,7 +7248,7 @@ public function getLocale(#[TypeAware(['8.0' => 'int'], default: '')] $type): st #[Pure] #[TentativeType] public function getPartsIterator( - #[TypeAware(['8.0' => 'int'], default: '')] + #[LanguageAware(['8.3' => 'string', '8.0' => 'int'], default: '')] #[EV([IntlPartsIterator::KEY_SEQUENTIAL, IntlPartsIterator::KEY_LEFT, IntlPartsIterator::KEY_RIGHT])] $type = IntlPartsIterator::KEY_SEQUENTIAL ): IntlPartsIterator {} @@ -7239,7 +7270,7 @@ public function getText(): ?string {} */ #[Pure] #[TentativeType] - public function isBoundary(#[TypeAware(['8.0' => 'int'], default: '')] $offset): bool {} + public function isBoundary(#[LanguageAware(['8.0' => 'int'], default: '')] $offset): bool {} /** * (PHP 5 >=5.5.0)
@@ -7257,7 +7288,7 @@ public function last(): int {} * @return int */ #[TentativeType] - public function next(#[TypeAware(['8.0' => 'int|null'], default: '')] $offset = null): int {} + public function next(#[LanguageAware(['8.0' => 'int|null'], default: '')] $offset = null): int {} /** * (PHP 5 >=5.5.0)
@@ -7265,7 +7296,7 @@ public function next(#[TypeAware(['8.0' => 'int|null'], default: '')] $offset = * @param int $offset */ #[TentativeType] - public function preceding(#[TypeAware(['8.0' => 'int'], default: '')] $offset): int {} + public function preceding(#[LanguageAware(['8.0' => 'int'], default: '')] $offset): int {} /** * (PHP 5 >=5.5.0)
@@ -7283,7 +7314,8 @@ public function previous(): int {} * @param string $text */ #[TentativeType] - public function setText(#[TypeAware(['8.0' => 'string'], default: '')] $text): ?bool {} + #[LanguageAware(['8.3' => 'bool'], default: 'bool|null')] + public function setText(#[LanguageAware(['8.0' => 'string'], default: '')] $text) {} /** * @since 8.0 @@ -7304,8 +7336,8 @@ class IntlRuleBasedBreakIterator extends IntlBreakIterator implements Traversabl */ #[Pure] public function __construct( - #[TypeAware(['8.0' => 'string'], default: '')] $rules, - #[TypeAware(['8.0' => 'bool'], default: '')] $compiled = false + #[LanguageAware(['8.0' => 'string'], default: '')] $rules, + #[LanguageAware(['8.0' => 'bool'], default: '')] $compiled = false ) {} /** @@ -7494,8 +7526,8 @@ class UConverter */ #[Pure] public function __construct( - #[TypeAware(['8.0' => 'string|null'], default: '')] $destination_encoding = null, - #[TypeAware(['8.0' => 'string|null'], default: '')] $source_encoding = null + #[LanguageAware(['8.0' => 'string|null'], default: '')] $destination_encoding = null, + #[LanguageAware(['8.0' => 'string|null'], default: '')] $source_encoding = null ) {} /** @@ -7509,8 +7541,8 @@ public function __construct( #[Pure] #[TentativeType] public function convert( - #[TypeAware(['8.0' => 'string'], default: '')] $str, - #[TypeAware(['8.0' => 'bool'], default: '')] $reverse = false + #[LanguageAware(['8.0' => 'string'], default: '')] $str, + #[LanguageAware(['8.0' => 'bool'], default: '')] $reverse = false ): string|false {} /** @@ -7525,9 +7557,9 @@ public function convert( */ #[TentativeType] public function fromUCallback( - #[TypeAware(['8.0' => 'int'], default: '')] $reason, - #[TypeAware(['8.0' => 'array'], default: '')] $source, - #[TypeAware(['8.0' => 'int'], default: '')] $codePoint, + #[LanguageAware(['8.0' => 'int'], default: '')] $reason, + #[LanguageAware(['8.0' => 'array'], default: '')] $source, + #[LanguageAware(['8.0' => 'int'], default: '')] $codePoint, &$error ): array|string|int|null {} @@ -7541,7 +7573,7 @@ public function fromUCallback( #[TentativeType] public static function getAliases( #[ElementAvailable(from: '5.5', to: '5.6')] $name = '', - #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string'], default: '')] $name + #[ElementAvailable(from: '7.0')] #[LanguageAware(['8.0' => 'string'], default: '')] $name ): array|false|null {} /** @@ -7655,7 +7687,7 @@ public static function reasonText( * @return bool */ #[TentativeType] - public function setDestinationEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding): bool {} + public function setDestinationEncoding(#[LanguageAware(['8.0' => 'string'], default: '')] $encoding): bool {} /** * (PHP 5 >=5.5.0)
@@ -7665,7 +7697,7 @@ public function setDestinationEncoding(#[TypeAware(['8.0' => 'string'], default: * @return bool */ #[TentativeType] - public function setSourceEncoding(#[TypeAware(['8.0' => 'string'], default: '')] $encoding): bool {} + public function setSourceEncoding(#[LanguageAware(['8.0' => 'string'], default: '')] $encoding): bool {} /** * (PHP 5 >=5.5.0)
@@ -7675,7 +7707,7 @@ public function setSourceEncoding(#[TypeAware(['8.0' => 'string'], default: '')] * @return bool */ #[TentativeType] - public function setSubstChars(#[TypeAware(['8.0' => 'string'], default: '')] $chars): bool {} + public function setSubstChars(#[LanguageAware(['8.0' => 'string'], default: '')] $chars): bool {} /** * (PHP 5 >=5.5.0)
@@ -7689,9 +7721,9 @@ public function setSubstChars(#[TypeAware(['8.0' => 'string'], default: '')] $ch */ #[TentativeType] public function toUCallback( - #[TypeAware(['8.0' => 'int'], default: '')] $reason, - #[TypeAware(['8.0' => 'string'], default: '')] $source, - #[TypeAware(['8.0' => 'string'], default: '')] $codeUnits, + #[LanguageAware(['8.0' => 'int'], default: '')] $reason, + #[LanguageAware(['8.0' => 'string'], default: '')] $source, + #[LanguageAware(['8.0' => 'string'], default: '')] $codeUnits, &$error ): array|string|int|null {} @@ -7707,9 +7739,9 @@ public function toUCallback( */ #[TentativeType] public static function transcode( - #[TypeAware(['8.0' => 'string'], default: '')] $str, - #[TypeAware(['8.0' => 'string'], default: '')] $toEncoding, - #[TypeAware(['8.0' => 'string'], default: '')] $fromEncoding, + #[LanguageAware(['8.0' => 'string'], default: '')] $str, + #[LanguageAware(['8.0' => 'string'], default: '')] $toEncoding, + #[LanguageAware(['8.0' => 'string'], default: '')] $fromEncoding, ?array $options = [] ): string|false {} } diff --git a/json/json.php b/json/json.php index 5019eb5f1..a5eecacc6 100644 --- a/json/json.php +++ b/json/json.php @@ -235,6 +235,11 @@ function json_last_error(): int {} #[Pure] function json_last_error_msg(): string {} +/** + * @since 8.3 + */ +function json_validate(string $json, int $depth = 512, int $flags = 0): bool {} + /** * All < and > are converted to \u003C and \u003E. * @link https://php.net/manual/en/json.constants.php diff --git a/ldap/ldap.php b/ldap/ldap.php index 2fbe26406..2d7eb4810 100644 --- a/ldap/ldap.php +++ b/ldap/ldap.php @@ -1422,6 +1422,11 @@ function ldap_count_references( #[PhpVersionAware(['8.1' => 'LDAP\Result'], default: 'resource')] $result ): int {} +/** + * @since 8.3 + */ +function ldap_exop_sync(LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = null, &$response_data = null, &$response_oid = null): LDAP\Result|bool {} + define('LDAP_ESCAPE_FILTER', 1); define('LDAP_ESCAPE_DN', 2); define('LDAP_DEREF_NEVER', 0); diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php index b7a755bed..fb4be1ec1 100644 --- a/mbstring/mbstring.php +++ b/mbstring/mbstring.php @@ -1416,6 +1416,11 @@ function mbereg_search_setpos($position) {} #[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")] function mb_str_split(string $string, int $length = 1, ?string $encoding) {} +/** + * @since 8.3 + */ +function mb_str_pad(string $string, int $length, string $pad_string = " ", int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string {} + /** * @removed 8.0 */ diff --git a/meta/attributes/Deprecated.php b/meta/attributes/Deprecated.php index 16cf71b6f..38b6fbe99 100644 --- a/meta/attributes/Deprecated.php +++ b/meta/attributes/Deprecated.php @@ -19,7 +19,8 @@ class Deprecated "7.4", "8.0", "8.1", - "8.2" + "8.2", + "8.3" ]; /** diff --git a/mysqli/mysqli.php b/mysqli/mysqli.php index 98068a61c..21709609e 100644 --- a/mysqli/mysqli.php +++ b/mysqli/mysqli.php @@ -1323,10 +1323,10 @@ public function fetch_column(int $column = 0): string|int|float|false|null {} * The field number. This value must be in the range from * 0 to number of fields - 1. *

- * @return bool true on success or false on failure. */ #[TentativeType] - public function field_seek(int $index): bool {} + #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] + public function field_seek(int $index) {} /** * Frees the memory associated with a result @@ -2010,9 +2010,9 @@ function mysqli_field_count(mysqli $mysql): int {} * @param mysqli_result $result A mysqli_result object returned by mysqli_query(), * mysqli_store_result(), mysqli_use_result() or mysqli_stmt_get_result(). * @param int $index The field number. This value must be in the range from 0 to number of fields - 1. - * @return bool */ -function mysqli_field_seek(mysqli_result $result, int $index): bool {} +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] +function mysqli_field_seek(mysqli_result $result, int $index) {} /** * Get current field offset of a result pointer diff --git a/openssl/openssl.php b/openssl/openssl.php index 7dc000984..e17494e57 100644 --- a/openssl/openssl.php +++ b/openssl/openssl.php @@ -1387,6 +1387,11 @@ function openssl_cms_read(string $input_filename, &$certificates): bool {} */ define('PKCS7_BINARY', 128); +/** + * @since 8.3 + */ +define('PKCS7_NOOLDMIMETYPE', 1024); + /** * Don't try and verify the signatures on a message * @link https://php.net/manual/en/openssl.constants.php @@ -1477,6 +1482,11 @@ function openssl_cms_read(string $input_filename, &$certificates): bool {} "DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:" . "AES256-GCM-SHA384:AES128:AES256:HIGH:!SSLv2:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!RC4:!ADH"); +/** + * @since 8.3 + */ +define('OPENSSL_CMS_OLDMIMETYPE', 1024); + /** * @since 8.0 */ diff --git a/pgsql/pgsql.php b/pgsql/pgsql.php index c28309a13..9b2411bc4 100644 --- a/pgsql/pgsql.php +++ b/pgsql/pgsql.php @@ -99,9 +99,9 @@ function pg_pconnect( * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @return bool TRUE on success or FALSE on failure. */ -function pg_close(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {} +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] +function pg_close(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null) {} /** * Poll the status of an in-progress asynchronous PostgreSQL connection attempt. @@ -1230,9 +1230,15 @@ function pg_copy_from( * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

+ * @param int $trace_mode Since PHP 8.3 optional trace mode * @return bool TRUE on success or FALSE on failure. */ -function pg_trace(string $filename, string $mode = "w", #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {} +function pg_trace( + string $filename, + string $mode = "w", + #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null, + #[PhpStormStubsElementAvailable(from: '8.3')] int $trace_mode = 0 +): bool {} /** * Disable tracing of a PostgreSQL connection @@ -1243,9 +1249,9 @@ function pg_trace(string $filename, string $mode = "w", #[LanguageLevelTypeAware * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @return bool Always returns TRUE. */ -function pg_untrace(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): bool {} +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] +function pg_untrace(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null) {} /** * Create a large object @@ -2066,6 +2072,31 @@ function pg_consume_input(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'] */ function pg_flush(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection): int|bool {} +/** + * @since 8.3 + */ +function pg_set_error_context_visibility(PgSql\Connection $connection, int $visibility): int {} + +/** + * @since 8.3 + */ +function pg_pipeline_status(PgSql\Connection $connection): int {} + +/** + * @since 8.3 + */ +function pg_pipeline_sync(PgSql\Connection $connection): bool {} + +/** + * @since 8.3 + */ +function pg_exit_pipeline_mode(PgSql\Connection $connection): bool {} + +/** + * @since 8.3 + */ +function pg_enter_pipeline_mode(PgSql\Connection $connection): bool {} + define('PGSQL_LIBPQ_VERSION', "15.4"); define('PGSQL_LIBPQ_VERSION_STR', "15.4"); @@ -2426,4 +2457,15 @@ function pg_flush(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], defaul const PGSQL_DIAG_DATATYPE_NAME = 100; const PGSQL_DIAG_CONSTRAINT_NAME = 110; const PGSQL_DIAG_SEVERITY_NONLOCALIZED = 86; + +const PGSQL_ERRORS_SQLSTATE = 0; +const PGSQL_TRACE_REGRESS_MODE = 2; +const PGSQL_PIPELINE_SYNC = 10; +const PGSQL_PIPELINE_ON = 1; +const PGSQL_PIPELINE_OFF = 0; +const PGSQL_PIPELINE_ABORTED = 2; +const PGSQL_SHOW_CONTEXT_NEVER = 0; +const PGSQL_SHOW_CONTEXT_ERRORS = 1; +const PGSQL_SHOW_CONTEXT_ALWAYS = 2; + // End of pgsql v. diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2f1b27673..9ade31f1d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -69,6 +69,16 @@ tests/StubsPhp81Tests.php + tests/BaseClassesTest.php + tests/BaseConstantsTest.php + tests/BaseFunctionsTest.php + tests/StubsMetaExpectedArgumentsTest.php + tests/StubsMetaInternalTagTest.php + tests/StubsParameterNamesTest.php + tests/StubsTypeHintsTest.php + tests/StubsForbiddenTypeHintsTest.php + + tests/BaseClassesTest.php tests/BaseConstantsTest.php tests/BaseFunctionsTest.php diff --git a/posix/posix.php b/posix/posix.php index cde825d4f..f6129e648 100644 --- a/posix/posix.php +++ b/posix/posix.php @@ -2,6 +2,7 @@ // Start of posix v. use JetBrains\PhpStorm\ArrayShape; +use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; use JetBrains\PhpStorm\Pure; /** @@ -700,7 +701,7 @@ function posix_getpwuid(int $user_id): array|false {} * */ #[Pure] -function posix_getrlimit(): array|false {} +function posix_getrlimit(#[PhpStormStubsElementAvailable(from: '8.3')] ?int $resource = null): array|false {} /** * Retrieve the error number set by the last posix function that failed @@ -745,6 +746,16 @@ function posix_strerror(int $error_code): string {} #[Pure] function posix_initgroups(string $username, int $group_id): bool {} +/** + * @since 8.3 + */ +function posix_sysconf(int $conf_id): int {} + +/** + * @since 8.3 + */ +function posix_eaccess(string $filename, int $flags = 0): bool {} + /** * Check whether the file exists. * @link https://php.net/manual/en/posix.constants.php @@ -910,4 +921,19 @@ function posix_initgroups(string $username, int $group_id): bool {} */ define('POSIX_RLIMIT_INFINITY', 9223372036854775807); +define('POSIX_SC_ARG_MAX', 0); +define('POSIX_SC_PAGESIZE', 30); +define('POSIX_SC_NPROCESSORS_CONF', 83); +define('POSIX_SC_NPROCESSORS_ONLN', 84); +define('POSIX_PC_LINK_MAX', 0); +define('POSIX_PC_MAX_CANON', 1); +define('POSIX_PC_MAX_INPUT', 2); +define('POSIX_PC_NAME_MAX', 3); +define('POSIX_PC_PATH_MAX', 4); +define('POSIX_PC_PIPE_BUF', 5); +define('POSIX_PC_CHOWN_RESTRICTED', 6); +define('POSIX_PC_NO_TRUNC', 7); +define('POSIX_PC_ALLOC_SIZE_MIN', 18); +define('POSIX_PC_SYMLINK_MAX', 19); + // End of posix v. diff --git a/random/random.php b/random/random.php index c63c8e3dc..becbf9c37 100644 --- a/random/random.php +++ b/random/random.php @@ -1,6 +1,7 @@ + * @param int|null $seed

* An optional seed value *

* @param int $mode [optional]

@@ -23,7 +24,7 @@ function lcg_value(): float {} * @return void */ function mt_srand( - int $seed = null, + #[LanguageLevelTypeAware(['8.3' => 'int|null'], default: 'int')] $seed = null, #[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937 ): void {} @@ -33,7 +34,7 @@ function mt_srand( * an alias of {@see mt_srand()}. *

* @link https://php.net/manual/en/function.srand.php - * @param int $seed

+ * @param int|null $seed

* Optional seed value *

* @param int $mode [optional]

@@ -42,7 +43,7 @@ function mt_srand( * @return void */ function srand( - int $seed = null, + #[LanguageLevelTypeAware(['8.3' => 'int|null'], default: 'int')] $seed = null, #[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937 ): void {} @@ -214,6 +215,21 @@ public function pickArrayKeys(array $array, int $num): array {} public function __serialize(): array {} public function __unserialize(array $data): void {} + + /** + * @since 8.3 + */ + public function nextFloat(): float {} + + /** + * @since 8.3 + */ + public function getFloat(float $min, float $max, IntervalBoundary $boundary = IntervalBoundary::ClosedOpen): float {} + + /** + * @since 8.3 + */ + public function getBytesFromString(string $string, int $length): string {} } /** @@ -230,4 +246,19 @@ class BrokenRandomEngineError extends RandomError {} * @since 8.2 */ class RandomException extends Exception {} + + /** + * @since 8.3 + */ + enum IntervalBoundary + { + public string $name; + + case ClosedOpen; + case ClosedClosed; + case OpenClosed; + case OpenOpen; + + public static function cases(): array {} + } } diff --git a/sockets/sockets.php b/sockets/sockets.php index 7fa20c9f4..b119c19ad 100644 --- a/sockets/sockets.php +++ b/sockets/sockets.php @@ -1400,6 +1400,11 @@ function socket_wsaprotocol_info_import($info_id) {} */ function socket_wsaprotocol_info_release($info_id) {} +/** + * @since 8.3 + */ +function socket_atmark(Socket $socket): bool {} + define('AF_UNIX', 1); define('AF_INET', 2); @@ -1462,7 +1467,12 @@ function socket_wsaprotocol_info_release($info_id) {} define('SO_TYPE', 3); define('SO_ERROR', 4); define('SO_BINDTODEVICE', 25); +define('SO_ATTACH_REUSEPORT_CBPF', 51); +define('SO_DETACH_FILTER', 27); +define('SO_DETACH_BPF', 27); + define('SOL_SOCKET', 1); +define('SOL_UDPLITE', 136); define('SOMAXCONN', 128); /** * @since 8.1 @@ -1560,6 +1570,14 @@ function socket_wsaprotocol_info_release($info_id) {} */ define('IPV6_MULTICAST_LOOP', 19); define('IPV6_V6ONLY', 26); +define('IP_BIND_ADDRESS_NO_PORT', 24); +define('IP_MTU_DISCOVER', 10); +define('IP_PMTUDISC_DO', 2); +define('IP_PMTUDISC_DONT', 0); +define('IP_PMTUDISC_WANT', 1); +define('IP_PMTUDISC_PROBE', 3); +define('IP_PMTUDISC_INTERFACE', 4); +define('IP_PMTUDISC_OMIT', 5); /** * Operation not permitted. @@ -2326,6 +2344,16 @@ function socket_wsaprotocol_info_release($info_id) {} */ define('TCP_KEEPCNT', 6); +/** + * @since 8.3 + */ +define('TCP_QUICKACK', 12); + +/** + * @since 8.3 + */ +define('TCP_REPAIR', 19); + /** * Socket_set_option for the socket_send* functions. * It avoids copy b/w userland and kernel for both TCP and UDP protocols. diff --git a/sqlite3/sqlite3.php b/sqlite3/sqlite3.php index b26210e46..f4d942d61 100644 --- a/sqlite3/sqlite3.php +++ b/sqlite3/sqlite3.php @@ -6,6 +6,11 @@ use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; use JetBrains\PhpStorm\Internal\TentativeType; +/** + * @since 8.3 + */ +class SQLite3Exception extends \Exception {} + /** * A class that interfaces SQLite 3 databases. * @link https://php.net/manual/en/class.sqlite3.php diff --git a/standard/standard_4.php b/standard/standard_4.php index 0c5e43fe2..ba361c1f1 100644 --- a/standard/standard_4.php +++ b/standard/standard_4.php @@ -244,12 +244,12 @@ function debug_zval_dump( * to true, print_r will return its output, instead of * printing it (which it does by default). *

- * @return string|true If given a string, integer or float, + * @return string|bool If given a string, integer or float, * the value itself will be printed. If given an array, values * will be presented in a format that shows keys and elements. Similar * notation is used for objects. */ -function print_r(mixed $value, bool $return = false): string|true {} +function print_r(mixed $value, bool $return = false): string|bool {} /** * Returns the amount of memory allocated to PHP diff --git a/standard/standard_6.php b/standard/standard_6.php index 92835dd96..c72bdf2d8 100644 --- a/standard/standard_6.php +++ b/standard/standard_6.php @@ -589,6 +589,11 @@ function stream_get_contents($stream, ?int $length = null, int $offset = -1): st */ function stream_supports_lock($stream): bool {} +/** + * @since 8.3 + */ +function stream_context_set_options($context, array $options): bool {} + /** * Gets line from file pointer and parse for CSV fields * @link https://php.net/manual/en/function.fgetcsv.php diff --git a/standard/standard_8.php b/standard/standard_8.php index 9b316e7ba..643f60961 100644 --- a/standard/standard_8.php +++ b/standard/standard_8.php @@ -59,7 +59,6 @@ * (strerror) corresponding to the present value of * errno. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function syslog(int $priority, string $message): bool {} @@ -67,7 +66,6 @@ function syslog(int $priority, string $message): bool {} /** * Close connection to system logger * @link https://php.net/manual/en/function.closelog.php - * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function closelog(): bool {} @@ -140,7 +138,7 @@ function define_syslog_variables() {} */ #[Pure] #[LanguageLevelTypeAware(["8.0" => "string"], default: "string|false")] -function metaphone(string $string, int $max_phonemes = 0): false|string {} +function metaphone(string $string, int $max_phonemes = 0) {} /** * Turn on output buffering @@ -395,7 +393,6 @@ function ob_list_handlers(): array {} * parameter sort_flags, for details * see sort. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function ksort(array &$array, int $flags = SORT_REGULAR): bool {} @@ -411,7 +408,6 @@ function ksort(array &$array, int $flags = SORT_REGULAR): bool {} * sort_flags, for details see * sort. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function krsort(array &$array, int $flags = SORT_REGULAR): bool {} @@ -422,9 +418,9 @@ function krsort(array &$array, int $flags = SORT_REGULAR): bool {} * @param array &$array

* The input array. *

- * @return bool true on success or false on failure. */ -function natsort(array &$array): bool {} +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] +function natsort(array &$array) {} /** * Sort an array using a case insensitive "natural order" algorithm @@ -432,9 +428,9 @@ function natsort(array &$array): bool {} * @param array &$array

* The input array. *

- * @return bool true on success or false on failure. */ -function natcasesort(array &$array): bool {} +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] +function natcasesort(array &$array) {} /** * Sort an array and maintain index association @@ -447,10 +443,9 @@ function natcasesort(array &$array): bool {} * parameter sort_flags, for details * see sort. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function asort(array &$array, int $flags = SORT_REGULAR): bool {} +function asort(array &$array, int $flags = SORT_REGULAR) {} /** * Sort an array in reverse order and maintain index association @@ -463,7 +458,6 @@ function asort(array &$array, int $flags = SORT_REGULAR): bool {} * sort_flags, for details see * sort. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function arsort(array &$array, int $flags = SORT_REGULAR): bool {} @@ -482,7 +476,6 @@ function arsort(array &$array, int $flags = SORT_REGULAR): bool {} * Sorting type flags:
* SORT_REGULAR - compare items normally * (don't change types)

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function sort(array &$array, int $flags = SORT_REGULAR): bool {} @@ -498,9 +491,9 @@ function sort(array &$array, int $flags = SORT_REGULAR): bool {} * parameter sort_flags, for details see * sort. *

- * @return bool true on success or false on failure. */ -function rsort(array &$array, int $flags = SORT_REGULAR): bool {} +#[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] +function rsort(array &$array, int $flags = SORT_REGULAR) {} /** * Sort an array by values using a user-defined comparison function @@ -513,7 +506,6 @@ function rsort(array &$array, int $flags = SORT_REGULAR): bool {} * greater than zero if the first argument is considered to be * respectively less than, equal to, or greater than the second. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function usort(array &$array, callable $callback): bool {} @@ -528,7 +520,6 @@ function usort(array &$array, callable $callback): bool {} * See usort and uksort for * examples of user-defined comparison functions. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function uasort(array &$array, callable $callback): bool {} @@ -550,7 +541,6 @@ function uasort(array &$array, callable $callback): bool {} * be respectively less than, equal to, or greater than the * second. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function uksort(array &$array, callable $callback): bool {} @@ -561,7 +551,6 @@ function uksort(array &$array, callable $callback): bool {} * @param array &$array

* The array. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function shuffle(array &$array): bool {} @@ -596,7 +585,6 @@ function shuffle(array &$array): bool {} * it will be passed as the third parameter to the callback * funcname. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function array_walk(object|array &$array, callable $callback, mixed $arg): bool {} @@ -625,7 +613,6 @@ function array_walk(object|array &$array, callable $callback, mixed $arg): bool * it will be passed as the third parameter to the callback * funcname. *

- * @return bool true on success or false on failure. */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] function array_walk_recursive(object|array &$array, callable $callback, mixed $arg): bool {} @@ -937,7 +924,11 @@ function array_fill_keys(array $keys, mixed $value): array {} * end, inclusive. */ #[Pure] -function range($start, $end, int|float $step = 1): array {} +function range( + #[LanguageLevelTypeAware(['8.3' => 'string|int|float'], default: '')] $start, + #[LanguageLevelTypeAware(['8.3' => 'string|int|float'], default: '')] $end, + int|float $step = 1 +): array {} /** * Sort multiple or multi-dimensional arrays diff --git a/standard/standard_9.php b/standard/standard_9.php index 4a2e1acab..e500a6ffc 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -948,6 +948,7 @@ class AssertionError extends Error {} * An optional new value for the option. *

* @return mixed The original setting of any option. + * @deprecated */ function assert_options(int $option, mixed $value): mixed {} diff --git a/tests/AbstractBaseStubsTestCase.php b/tests/AbstractBaseStubsTestCase.php index a62e5b8f3..6c4483b52 100644 --- a/tests/AbstractBaseStubsTestCase.php +++ b/tests/AbstractBaseStubsTestCase.php @@ -16,6 +16,7 @@ use RuntimeException; use StubTests\Model\PHPClass; use StubTests\Model\PHPConst; +use StubTests\Model\PHPEnum; use StubTests\Model\PHPFunction; use StubTests\Model\PHPInterface; use StubTests\Parsers\ParserUtils; @@ -75,12 +76,15 @@ public static function getStringRepresentationOfDefaultParameterValue(mixed $def if ($class === 'self' && $contextClass !== null) { $class = $contextClass->name; } - $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class) ?? + $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($class) ?? + PhpStormStubsSingleton::getPhpStormStubs()->getClass($class) ?? PhpStormStubsSingleton::getPhpStormStubs()->getInterface($class); if ($parentClass === null) { throw new Exception("Class $class not found in stubs"); } - if ((string)$defaultValue->name === 'class') { + if ($parentClass instanceof PHPEnum) { + $value = $parentClass->name . "::" . $defaultValue->name; + } elseif ((string)$defaultValue->name === 'class') { $value = (string)$defaultValue->class; } else { $constant = $parentClass->getConstant((string)$defaultValue->name);; @@ -90,6 +94,8 @@ public static function getStringRepresentationOfDefaultParameterValue(mixed $def $value = "null"; } elseif (is_array($defaultValue) || $defaultValue instanceof Array_) { $value = '[]'; + } elseif ($defaultValue instanceof \UnitEnum){ + $value = get_class($defaultValue) . "::" . $defaultValue->name; } else { $value = strval($defaultValue); } diff --git a/tests/BaseClassesTest.php b/tests/BaseClassesTest.php index b72046f49..d61290a78 100644 --- a/tests/BaseClassesTest.php +++ b/tests/BaseClassesTest.php @@ -6,6 +6,7 @@ use PHPUnit\Framework\Exception; use RuntimeException; use StubTests\Model\PHPClass; +use StubTests\Model\PHPEnum; use StubTests\Model\PHPInterface; use StubTests\Model\PHPMethod; use StubTests\Model\PHPProperty; @@ -45,10 +46,12 @@ public function testClassesParent(PHPClass|PHPInterface $class) * @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionMethodsProvider::classMethodsProvider * @throws Exception|RuntimeException */ - public function testClassesMethodsExist(PHPClass|PHPInterface $class, PHPMethod $method) + public function testClassesMethodsExist(PHPClass|PHPInterface|PHPEnum $class, PHPMethod $method) { $className = $class->name; - if ($class instanceof PHPClass) { + if ($class instanceof PHPEnum) { + $stubClass = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className); + } elseif ($class instanceof PHPClass) { $stubClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className); } else { $stubClass = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className); @@ -63,7 +66,9 @@ public function testClassesMethodsExist(PHPClass|PHPInterface $class, PHPMethod public function testClassesFinalMethods(PHPClass|PHPInterface $class, PHPMethod $method) { $className = $class->name; - if ($class instanceof PHPClass) { + if ($class instanceof PHPEnum) { + $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className)->getMethod($method->name); + } elseif ($class instanceof PHPClass) { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className)->getMethod($method->name); } else { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className)->getMethod($method->name); @@ -82,7 +87,9 @@ public function testClassesFinalMethods(PHPClass|PHPInterface $class, PHPMethod public function testClassesStaticMethods(PHPClass|PHPInterface $class, PHPMethod $method) { $className = $class->name; - if ($class instanceof PHPClass) { + if ($class instanceof PHPEnum) { + $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className)->getMethod($method->name); + } elseif ($class instanceof PHPClass) { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className)->getMethod($method->name); } else { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className)->getMethod($method->name); @@ -101,7 +108,9 @@ public function testClassesStaticMethods(PHPClass|PHPInterface $class, PHPMethod public function testClassesMethodsVisibility(PHPClass|PHPInterface $class, PHPMethod $method) { $className = $class->name; - if ($class instanceof PHPClass) { + if ($class instanceof PHPEnum) { + $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className)->getMethod($method->name); + } elseif ($class instanceof PHPClass) { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className)->getMethod($method->name); } else { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className)->getMethod($method->name); @@ -120,7 +129,9 @@ public function testClassesMethodsVisibility(PHPClass|PHPInterface $class, PHPMe public function testClassMethodsParametersCount(PHPClass|PHPInterface $class, PHPMethod $method) { $className = $class->name; - if ($class instanceof PHPClass) { + if ($class instanceof PHPEnum) { + $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($className)->getMethod($method->name); + } elseif ($class instanceof PHPClass) { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($className)->getMethod($method->name); } else { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($className)->getMethod($method->name); diff --git a/tests/DockerImages/8.3/Dockerfile b/tests/DockerImages/8.3/Dockerfile new file mode 100644 index 000000000..766eb15a0 --- /dev/null +++ b/tests/DockerImages/8.3/Dockerfile @@ -0,0 +1,14 @@ +FROM php:8.3.0beta3-alpine + +RUN set -eux; \ + apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community --no-cache --virtual .build-deps \ + bash gcc g++ make autoconf pkgconfig git \ + libmcrypt-dev imap-dev php-imap enchant2 php-enchant bzip2-dev gettext-dev libxml2-dev php82-dev php-gd icu-dev \ + php-zip php-tidy php-intl libffi-dev openssl-dev php82-pear rabbitmq-c rabbitmq-c-dev librrd \ + libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ + libpng-dev gpgme gpgme-dev libpq-dev aspell-dev + +RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ + pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pgsql pspell + +WORKDIR /opt/project/phpstorm-stubs diff --git a/tests/DockerImages/testRunner/Dockerfile b/tests/DockerImages/testRunner/Dockerfile index fc6b6ed8c..244e1897c 100644 --- a/tests/DockerImages/testRunner/Dockerfile +++ b/tests/DockerImages/testRunner/Dockerfile @@ -1,8 +1,26 @@ -FROM php:8.1-apache +FROM php:8.3.0beta3-apache RUN echo 'memory_limit = 1024M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini COPY --from=composer /usr/bin/composer /usr/bin/composer RUN apt-get update && apt-get -y install git zip unzip - +RUN apt-get update -y && \ + apt-get install git -y && \ + git clone https://github.com/xdebug/xdebug +WORKDIR xdebug +RUN phpize && \ + chmod +x configure && \ + ./configure --enable-xdebug && \ + make && \ + make install +# Enable xdebug extension +RUN echo "zend_extension=$(php-config --extension-dir)/xdebug.so" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini +#RUN pecl install xdebug +#RUN docker-php-ext-enable xdebug +RUN echo "xdebug.mode=develop,debug,coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini +#RUN echo "xdebug.remote_host=192.168.178.178" >> /usr/local/etc/php/php.ini +RUN echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/php.ini +RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini +RUN echo "xdebug.output_dir=/opt/project/xdebug_snapshots" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini +RUN echo "xdebug.log=/opt/project/xdebug_logs/xdebug33php82.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini WORKDIR /opt/project/phpstorm-stubs diff --git a/tests/Model/BasePHPClass.php b/tests/Model/BasePHPClass.php index fc5a593d2..300ec83c3 100644 --- a/tests/Model/BasePHPClass.php +++ b/tests/Model/BasePHPClass.php @@ -36,6 +36,23 @@ function (PHPConst $nextConstant) use ($parsedConstant) { } } + public function addEnumCase(PHPEnumCase $parsedConstant) + { + if (isset($parsedConstant->name)) { + if (array_key_exists($parsedConstant->name, $this->constants)) { + $amount = count(array_filter( + $this->constants, + function (PHPConst $nextConstant) use ($parsedConstant) { + return $nextConstant->name === $parsedConstant->name; + } + )); + $this->constants[$parsedConstant->name . '_duplicated_' . $amount] = $parsedConstant; + } else { + $this->constants[$parsedConstant->name] = $parsedConstant; + } + } + } + /** * @return PHPConst|null * @throws RuntimeException diff --git a/tests/Model/PHPConst.php b/tests/Model/PHPConst.php index 15cc90679..e1f7247e2 100644 --- a/tests/Model/PHPConst.php +++ b/tests/Model/PHPConst.php @@ -8,6 +8,7 @@ use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Expr\UnaryMinus; use PhpParser\Node\Stmt\ClassConst; +use PhpParser\Node\Stmt\Enum_; use PhpParser\Node\Stmt\Namespace_; use PhpParser\NodeAbstract; use ReflectionClassConstant; @@ -107,9 +108,14 @@ protected function getConstValue($node) protected function getConstantFQN(NodeAbstract $node, $nodeName) { $namespace = ''; - $parentParentNode = $node->getAttribute('parent')->getAttribute('parent'); - if ($parentParentNode instanceof Namespace_ && !empty($parentParentNode->name)) { - $namespace = '\\' . implode('\\', $parentParentNode->name->parts) . '\\'; + $parentNode = $node->getAttribute('parent'); + if ($parentNode instanceof Enum_) { + return $nodeName; + } else { + $parentParentNode = $parentNode->getAttribute('parent'); + if ($parentParentNode instanceof Namespace_ && !empty($parentParentNode->name)) { + $namespace = '\\' . implode('\\', $parentParentNode->name->parts) . '\\'; + } } return $namespace . $nodeName; diff --git a/tests/Model/PHPEnum.php b/tests/Model/PHPEnum.php new file mode 100644 index 000000000..0b3096720 --- /dev/null +++ b/tests/Model/PHPEnum.php @@ -0,0 +1,111 @@ +name = $reflectionObject->getName(); + $this->interfaces = $reflectionObject->getInterfaceNames(); + $this->isFinal = $reflectionObject->isFinal(); + if (method_exists($reflectionObject, 'isReadOnly')) { + $this->isReadonly = $reflectionObject->isReadOnly(); + } + foreach ($reflectionObject->getMethods() as $method) { + if ($method->getDeclaringClass()->getName() !== $this->name) { + continue; + } + $parsedMethod = (new PHPMethod())->readObjectFromReflection($method); + $this->addMethod($parsedMethod); + } + + if (method_exists($reflectionObject, 'getReflectionConstants')) { + foreach ($reflectionObject->getReflectionConstants() as $constant) { + if ($constant->getDeclaringClass()->getName() !== $this->name) { + continue; + } + if ($constant->isEnumCase()) { + $enumCase = (new PHPEnumCase())->readObjectFromReflection($constant); + $this->addEnumCase($enumCase); + } else { + $parsedConstant = (new PHPConst())->readObjectFromReflection($constant); + $this->addConstant($parsedConstant); + } + } + } + + foreach ($reflectionObject->getProperties() as $property) { + if ($property->getDeclaringClass()->getName() !== $this->name) { + continue; + } + $parsedProperty = (new PHPProperty())->readObjectFromReflection($property); + $this->addProperty($parsedProperty); + } + + return $this; + } + + /** + * @param Enum_ $node + * @return static + */ + public function readObjectFromStubNode($node) + { + $this->name = self::getFQN($node); + $this->availableVersionsRangeFromAttribute = self::findAvailableVersionsRangeFromAttribute($node->attrGroups); + $this->collectTags($node); + if (!empty($node->extends)) { + $this->parentClass = ''; + foreach ($node->extends->parts as $part) { + $this->parentClass .= "\\$part"; + } + $this->parentClass = ltrim($this->parentClass, "\\"); + } + if (!empty($node->implements)) { + foreach ($node->implements as $interfaceObject) { + $interfaceFQN = ''; + foreach ($interfaceObject->parts as $interface) { + $interfaceFQN .= "\\$interface"; + } + $this->interfaces[] = ltrim($interfaceFQN, "\\"); + } + } + if ($node->getDocComment() !== null) { + $docBlock = DocBlockFactory::createInstance()->create($node->getDocComment()->getText()); + /** @var PropertyRead[] $properties */ + $properties = array_merge( + $docBlock->getTagsByName('property-read'), + $docBlock->getTagsByName('property') + ); + foreach ($properties as $property) { + $propertyName = $property->getVariableName(); + assert($propertyName !== '', "@property name is empty in class $this->name"); + $newProperty = new PHPProperty($this->name); + $newProperty->is_static = false; + $newProperty->access = 'public'; + $newProperty->name = $propertyName; + $newProperty->parentName = $this->name; + $newProperty->typesFromSignature = self::convertParsedTypeToArray($property->getType()); + assert( + !array_key_exists($propertyName, $this->properties), + "Property '$propertyName' is already declared in class '$this->name'" + ); + $this->properties[$propertyName] = $newProperty; + } + } + + return $this; + } + + public function readMutedProblems($jsonData) {} +} diff --git a/tests/Model/PHPEnumCase.php b/tests/Model/PHPEnumCase.php new file mode 100644 index 000000000..ea5bc4e5c --- /dev/null +++ b/tests/Model/PHPEnumCase.php @@ -0,0 +1,45 @@ +name = $reflectionObject->name; + $this->value = $reflectionObject->getValue(); + if ($reflectionObject->isPrivate()) { + $this->visibility = 'private'; + } elseif ($reflectionObject->isProtected()) { + $this->visibility = 'protected'; + } else { + $this->visibility = 'public'; + } + return $this; + } + + /** + * @param EnumCase $node + * @return $this|PHPEnumCase + */ + public function readObjectFromStubNode($node) + { + $this->name = $this->getConstantFQN($node, $node->name->name); + //$this->value = $this->getConstValue($node); + //$this->collectTags($node); + $parentNode = $node->getAttribute('parent'); + if (property_exists($parentNode, 'attrGroups')) { + $this->availableVersionsRangeFromAttribute = self::findAvailableVersionsRangeFromAttribute($parentNode->attrGroups); + } + $this->parentName = self::getFQN($parentNode->namespacedName); + return $this; + } + + public function readMutedProblems($jsonData) {} +} diff --git a/tests/Model/PhpVersions.php b/tests/Model/PhpVersions.php index f5cafc53b..784dc2903 100644 --- a/tests/Model/PhpVersions.php +++ b/tests/Model/PhpVersions.php @@ -10,7 +10,7 @@ class PhpVersions implements ArrayAccess, IteratorAggregate { - private static $versions = [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2]; + private static $versions = [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]; public static function getLatest() { diff --git a/tests/Model/StubsContainer.php b/tests/Model/StubsContainer.php index aa93c096c..44d60ef4f 100644 --- a/tests/Model/StubsContainer.php +++ b/tests/Model/StubsContainer.php @@ -28,6 +28,11 @@ class StubsContainer */ private $interfaces = []; + /** + * @var PHPEnum[] + */ + private $enums = []; + /** * @return PHPConst[] */ @@ -188,6 +193,38 @@ public function getClass($name, $sourceFilePath = null, $shouldSuitCurrentPhpVer return null; } + /** + * @param string $name + * @param string|null $sourceFilePath + * @param bool $shouldSuitCurrentPhpVersion + * @return PHPEnum|null + * @throws RuntimeException + */ + public function getEnum($name, $sourceFilePath = null, $shouldSuitCurrentPhpVersion = true) + { + $enums = array_filter($this->enums, function (PHPEnum $enum) use ($shouldSuitCurrentPhpVersion, $name) { + return $enum->name === $name && + (!$shouldSuitCurrentPhpVersion || BasePHPElement::entitySuitsCurrentPhpVersion($enum)); + }); + if (count($enums) === 1) { + return array_pop($enums); + } + + if ($sourceFilePath !== null) { + $enums = array_filter($enums, function (PHPEnum $enum) use ($shouldSuitCurrentPhpVersion, $sourceFilePath) { + return $enum->sourceFilePath === $sourceFilePath && + (!$shouldSuitCurrentPhpVersion || BasePHPElement::entitySuitsCurrentPhpVersion($enum)); + }); + } + if (count($enums) > 1) { + throw new RuntimeException("Multiple enums with name $name found"); + } + if (!empty($enums)) { + return array_pop($enums); + } + return null; + } + /** * @return PHPClass[] */ @@ -255,6 +292,14 @@ public function getInterfaces() return $this->interfaces; } + /** + * @return PHPEnum[] + */ + public function getEnums() + { + return $this->enums; + } + /** * @return PHPInterface[] */ @@ -281,4 +326,21 @@ function (PHPInterface $nextInterface) use ($interface) { } } } + + public function addEnum(PHPEnum $enum) + { + if (isset($enum->name)) { + if (array_key_exists($enum->name, $this->enums)) { + $amount = count(array_filter( + $this->enums, + function (PHPEnum $nextEnum) use ($enum) { + return $nextEnum->name === $enum->name; + } + )); + $this->enums[$enum->name . '_duplicated_' . $amount] = $enum; + } else { + $this->enums[$enum->name] = $enum; + } + } + } } diff --git a/tests/Parsers/PHPReflectionParser.php b/tests/Parsers/PHPReflectionParser.php index dc443b53c..4a6bb9159 100644 --- a/tests/Parsers/PHPReflectionParser.php +++ b/tests/Parsers/PHPReflectionParser.php @@ -7,6 +7,7 @@ use StubTests\Model\CommonUtils; use StubTests\Model\PHPClass; use StubTests\Model\PHPDefineConstant; +use StubTests\Model\PHPEnum; use StubTests\Model\PHPFunction; use StubTests\Model\PHPInterface; use StubTests\Model\StubsContainer; @@ -44,9 +45,15 @@ public static function getStubs() foreach (get_declared_classes() as $clazz) { $reflectionClass = new ReflectionClass($clazz); if ($reflectionClass->isInternal()) { - $class = (new PHPClass())->readObjectFromReflection($reflectionClass); - $class->readMutedProblems($jsonData->classes); - $stubs->addClass($class); + if (method_exists($reflectionClass, 'isEnum') && $reflectionClass->isEnum()) { + $enum = (new PHPEnum())->readObjectFromReflection($reflectionClass); + $enum->readMutedProblems($jsonData->enums); + $stubs->addEnum($enum); + } else { + $class = (new PHPClass())->readObjectFromReflection($reflectionClass); + $class->readMutedProblems($jsonData->classes); + $stubs->addClass($class); + } } } diff --git a/tests/Parsers/ParserUtils.php b/tests/Parsers/ParserUtils.php index c29b1db8c..a2b3b66d3 100644 --- a/tests/Parsers/ParserUtils.php +++ b/tests/Parsers/ParserUtils.php @@ -122,7 +122,10 @@ private static function getLatestAvailableVersionFromPhpDoc(BasePHPElement $elem */ private static function getSinceVersionsFromParentClass(PHPMethod|PHPConst $element): array { - $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($element->parentName, shouldSuitCurrentPhpVersion: false); + $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($element->parentName, shouldSuitCurrentPhpVersion: false); + if ($parentClass === null) { + $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($element->parentName, shouldSuitCurrentPhpVersion: false); + } if ($parentClass === null) { $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($element->parentName, shouldSuitCurrentPhpVersion: false); } @@ -137,7 +140,10 @@ private static function getSinceVersionsFromParentClass(PHPMethod|PHPConst $elem */ public static function getLatestAvailableVersionsFromParentClass(PHPMethod|PHPConst $element): array { - $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($element->parentName, shouldSuitCurrentPhpVersion: false); + $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($element->parentName, shouldSuitCurrentPhpVersion: false); + if ($parentClass === null) { + $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($element->parentName, shouldSuitCurrentPhpVersion: false); + } if ($parentClass === null) { $parentClass = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($element->parentName, shouldSuitCurrentPhpVersion: false); } diff --git a/tests/Parsers/Visitors/ASTVisitor.php b/tests/Parsers/Visitors/ASTVisitor.php index 95ea11494..4a83ef45d 100644 --- a/tests/Parsers/Visitors/ASTVisitor.php +++ b/tests/Parsers/Visitors/ASTVisitor.php @@ -8,6 +8,7 @@ use PhpParser\Node\Const_; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Stmt\Class_; +use PhpParser\Node\Stmt\Enum_; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use PhpParser\Node\Stmt\Interface_; @@ -17,6 +18,8 @@ use StubTests\Model\PHPClass; use StubTests\Model\PHPConst; use StubTests\Model\PHPDefineConstant; +use StubTests\Model\PHPEnum; +use StubTests\Model\PHPEnumCase; use StubTests\Model\PHPFunction; use StubTests\Model\PHPInterface; use StubTests\Model\PHPMethod; @@ -43,6 +46,15 @@ public function enterNode(Node $node): void $function->stubBelongsToCore = true; } $this->stubs->addFunction($function); + } elseif ($node instanceof Node\Stmt\EnumCase) { + $constant = (new PHPEnumCase())->readObjectFromStubNode($node); + $constant->sourceFilePath = $this->sourceFilePath; + if ($this->isStubCore) { + $constant->stubBelongsToCore = true; + } + if ($this->stubs->getEnum($constant->parentName, $this->sourceFilePath, false) !== null) { + $this->stubs->getEnum($constant->parentName, $this->sourceFilePath, false)->addEnumCase($constant); + } } elseif ($node instanceof Const_) { $constant = (new PHPConst())->readObjectFromStubNode($node); $constant->sourceFilePath = $this->sourceFilePath; @@ -51,6 +63,8 @@ public function enterNode(Node $node): void } if ($constant->parentName === null) { $this->stubs->addConstant($constant); + } elseif ($this->stubs->getEnum($constant->parentName, $this->sourceFilePath, false) !== null) { + $this->stubs->getEnum($constant->parentName, $this->sourceFilePath, false)->addConstant($constant); } elseif ($this->stubs->getClass($constant->parentName, $this->sourceFilePath, false) !== null) { $this->stubs->getClass($constant->parentName, $this->sourceFilePath, false)->addConstant($constant); } elseif ($this->stubs->getInterface($constant->parentName, $this->sourceFilePath, false) !== null) { @@ -71,7 +85,10 @@ public function enterNode(Node $node): void if ($this->isStubCore) { $method->stubBelongsToCore = true; } - if ($this->stubs->getClass($method->parentName, $this->sourceFilePath, false) !== null) { + if ($this->stubs->getEnum($method->parentName, $this->sourceFilePath, false) !== null) { + $this->stubs->getEnum($method->parentName, $this->sourceFilePath, false)->addMethod($method); + } + elseif ($this->stubs->getClass($method->parentName, $this->sourceFilePath, false) !== null) { $this->stubs->getClass($method->parentName, $this->sourceFilePath, false)->addMethod($method); } elseif ($this->stubs->getInterface($method->parentName, $this->sourceFilePath, false) !== null) { $this->stubs->getInterface($method->parentName, $this->sourceFilePath, false)->addMethod($method); @@ -90,6 +107,13 @@ public function enterNode(Node $node): void $class->stubBelongsToCore = true; } $this->stubs->addClass($class); + } elseif ($node instanceof Enum_) { + $enum = (new PHPEnum())->readObjectFromStubNode($node); + $enum->sourceFilePath = $this->sourceFilePath; + if ($this->isStubCore) { + $enum->stubBelongsToCore = true; + } + $this->stubs->addEnum($enum); } elseif ($node instanceof Node\Stmt\Property) { $property = (new PHPProperty())->readObjectFromStubNode($node); $property->sourceFilePath = $this->sourceFilePath; diff --git a/tests/StubsConstantsAndParametersValuesTest.php b/tests/StubsConstantsAndParametersValuesTest.php index 6498e3240..cc2c58135 100644 --- a/tests/StubsConstantsAndParametersValuesTest.php +++ b/tests/StubsConstantsAndParametersValuesTest.php @@ -7,6 +7,7 @@ use RuntimeException; use StubTests\Model\PHPClass; use StubTests\Model\PHPConst; +use StubTests\Model\PHPEnum; use StubTests\Model\PHPFunction; use StubTests\Model\PHPInterface; use StubTests\Model\PHPMethod; @@ -62,7 +63,9 @@ public function testFunctionsDefaultParametersValue(PHPFunction $function, PHPPa */ public function testMethodsDefaultParametersValue(PHPClass|PHPInterface $class, PHPMethod $method, PHPParameter $parameter) { - if ($class instanceof PHPClass) { + if ($class instanceof PHPEnum) { + $phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($class->name)->getMethod($method->name); + } elseif ($class instanceof PHPClass) { $phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name)->getMethod($method->name); } else { $phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($class->name)->getMethod($method->name); diff --git a/tests/StubsTypeHintsTest.php b/tests/StubsTypeHintsTest.php index 9b152a395..5b84b6123 100644 --- a/tests/StubsTypeHintsTest.php +++ b/tests/StubsTypeHintsTest.php @@ -6,6 +6,7 @@ use PHPUnit\Framework\Exception; use RuntimeException; use StubTests\Model\PHPClass; +use StubTests\Model\PHPEnum; use StubTests\Model\PHPFunction; use StubTests\Model\PHPInterface; use StubTests\Model\PHPMethod; @@ -85,7 +86,9 @@ public function testFunctionsParametersTypeHints(PHPFunction $function, PHPParam public function testMethodsReturnTypeHints(PHPClass|PHPInterface $class, PHPMethod $method) { $functionName = $method->name; - if ($class instanceof PHPClass) { + if ($class instanceof PHPEnum) { + $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($class->name)->getMethod($method->name); + } elseif ($class instanceof PHPClass) { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name)->getMethod($functionName); } else { $stubMethod = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($class->name)->getMethod($functionName); diff --git a/tests/TestData/Providers/Reflection/ReflectionMethodsProvider.php b/tests/TestData/Providers/Reflection/ReflectionMethodsProvider.php index 0f036174b..56015c4e0 100644 --- a/tests/TestData/Providers/Reflection/ReflectionMethodsProvider.php +++ b/tests/TestData/Providers/Reflection/ReflectionMethodsProvider.php @@ -47,7 +47,8 @@ public static function classMethodsWithParametersProvider(): ?Generator public static function classMethodsWithoutTentitiveReturnTypeProvider(): ?Generator { $classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() + - ReflectionStubsSingleton::getReflectionStubs()->getInterfaces(); + ReflectionStubsSingleton::getReflectionStubs()->getInterfaces() + + ReflectionStubsSingleton::getReflectionStubs()->getEnums(); foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) { foreach (EntitiesFilter::getFiltered( $class->methods, @@ -64,7 +65,8 @@ public static function classMethodsWithoutTentitiveReturnTypeProvider(): ?Genera public static function classMethodsWithTentitiveReturnTypeProvider(): ?Generator { $classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() + - ReflectionStubsSingleton::getReflectionStubs()->getInterfaces(); + ReflectionStubsSingleton::getReflectionStubs()->getInterfaces() + + ReflectionStubsSingleton::getReflectionStubs()->getEnums(); foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) { foreach (EntitiesFilter::getFiltered( $class->methods, @@ -81,7 +83,8 @@ public static function classMethodsWithTentitiveReturnTypeProvider(): ?Generator private static function yieldFilteredMethods(int ...$problemTypes): ?Generator { $classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() + - ReflectionStubsSingleton::getReflectionStubs()->getInterfaces(); + ReflectionStubsSingleton::getReflectionStubs()->getInterfaces() + + ReflectionStubsSingleton::getReflectionStubs()->getEnums(); foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) { foreach (EntitiesFilter::getFiltered($class->methods, null, ...$problemTypes) as $method) { yield "Method $class->name::$method->name" => [$class, $method]; diff --git a/tests/TestData/mutedProblems.json b/tests/TestData/mutedProblems.json index afb9962a4..31b8f6385 100644 --- a/tests/TestData/mutedProblems.json +++ b/tests/TestData/mutedProblems.json @@ -1052,6 +1052,17 @@ ] } ] + }, + { + "name": "hash_pbkdf2", + "problems": [ + { + "description": "parameter mismatch", + "versions": [ + 8.2 + ] + } + ] } ], "classes": [ @@ -1153,7 +1164,8 @@ "versions": [ 8.0, 8.1, - 8.2 + 8.2, + 8.3 ] } ], @@ -3214,7 +3226,8 @@ "versions": [ 8.0, 8.1, - 8.2 + 8.2, + 8.3 ] } ] @@ -3241,7 +3254,8 @@ "versions": [ 8.0, 8.1, - 8.2 + 8.2, + 8.3 ] } ] @@ -3331,5 +3345,6 @@ } ] } - ] + ], + "enums": [] } diff --git a/xml/xml.php b/xml/xml.php index 5d22a2a91..151fa8399 100644 --- a/xml/xml.php +++ b/xml/xml.php @@ -521,13 +521,14 @@ function xml_parser_set_option(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], * @param int $option Which option to fetch. XML_OPTION_CASE_FOLDING * and XML_OPTION_TARGET_ENCODING are available. * See xml_parser_set_option for their description. - * @return string|int This function returns FALSE if parser does + * @return string|int|bool This function returns FALSE if parser does * not refer to a valid parser or if option isn't * valid (generates also a E_WARNING). * Else the option's value is returned. */ #[Pure] -function xml_parser_get_option(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, int $option): string|int {} +#[LanguageLevelTypeAware(["8.3" => "string|int|bool"], default: "string|int")] +function xml_parser_get_option(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, int $option) {} define('XML_ERROR_NONE', 0); define('XML_ERROR_NO_MEMORY', 1); From 026ffd05f5a6c848e7481e21c5d62cc4adcd63ac Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 28 Aug 2023 10:47:10 +0200 Subject: [PATCH 34/73] [phpstorm-stubs] update for PHP 8.3. Remove redundant return types --- imap/imap.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/imap/imap.php b/imap/imap.php index 9a64c233e..3425aac10 100644 --- a/imap/imap.php +++ b/imap/imap.php @@ -86,7 +86,6 @@ function imap_reopen( * deletion. You can achieve the same thing by using * imap_expunge *

- * @return bool|true TRUE on success or FALSE on failure. Since PHP 8.3 always true */ #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] function imap_close(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $flags = 0) {} @@ -522,7 +521,7 @@ function imap_expunge(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], def *

*/ #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] -function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {} +function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0) {} /** * Unmark the message which is marked deleted @@ -534,7 +533,7 @@ function imap_delete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], defa * @param int $flags [optional] */ #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] -function imap_undelete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0): bool {} +function imap_undelete(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $message_nums, int $flags = 0) {} /** * Check current mailbox From 9a699ed47e71a8a60df76af450644e86c9b2d364 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 28 Aug 2023 10:48:13 +0200 Subject: [PATCH 35/73] [phpstorm-stubs] update for PHP 8.3. imagegd2 fix default value --- gd/gd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gd/gd.php b/gd/gd.php index a35700fdb..a17deb3f5 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -1121,7 +1121,7 @@ function imagegd(GdImage $image, ?string $file = null): bool {} *

* @return bool true on success or false on failure. */ -function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = 1): bool {} +function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = IMG_GD2_RAW): bool {} /** * Destroy an image From 2d45cc5639302d6a2973c8dbcde1c1bc377f15c7 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 28 Aug 2023 14:13:40 +0200 Subject: [PATCH 36/73] [phpstorm-stubs] update for PHP 8.3. imap fix return type --- imap/imap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imap/imap.php b/imap/imap.php index 3425aac10..8458a9ed8 100644 --- a/imap/imap.php +++ b/imap/imap.php @@ -888,7 +888,7 @@ function imap_mailboxmsginfo(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection * instead of sequence numbers

*/ #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] -function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = NIL): bool {} +function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = NIL) {} /** * Clears flags on messages @@ -910,7 +910,7 @@ function imap_setflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'] * instead of sequence numbers

*/ #[LanguageLevelTypeAware(['8.3' => 'true'], default: 'bool')] -function imap_clearflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = 0): bool {} +function imap_clearflag_full(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $sequence, string $flag, int $options = 0) {} /** * Gets and sort messages From d3ad02251af58c9a31ebe0c2dd454c81aac113a0 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 28 Aug 2023 19:43:18 +0200 Subject: [PATCH 37/73] [phpstorm-stubs] add deprecated version for assert_options --- standard/standard_9.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/standard/standard_9.php b/standard/standard_9.php index e500a6ffc..cf0d340de 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -4,6 +4,7 @@ * @since 5.6 */ +use JetBrains\PhpStorm\Deprecated; use JetBrains\PhpStorm\ExpectedValues; use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware; use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable; @@ -948,8 +949,8 @@ class AssertionError extends Error {} * An optional new value for the option. *

* @return mixed The original setting of any option. - * @deprecated */ +#[Deprecated(since: "8.3")] function assert_options(int $option, mixed $value): mixed {} /** From beac237645ee7cf631f4386d21cffb016c8cde87 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 28 Aug 2023 20:05:50 +0200 Subject: [PATCH 38/73] [phpstorm-stubs] remove redundant typehints and PHPDocs --- dom/dom_c.php | 25 +++---------------------- standard/standard_8.php | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/dom/dom_c.php b/dom/dom_c.php index 099399e40..fbe497b58 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -318,35 +318,16 @@ public function lookupNamespaceURI(?string $prefix): ?string {} public function lookupNamespaceUri($prefix) {} /** - * @param DOMNode $arg + * @param DOMNode|null $arg * @return bool - * @removed 8.0 */ - public function isEqualNode(DOMNode $arg) {} + #[LanguageLevelTypeAware(['8.3' => 'bool'], default: '')] + public function isEqualNode(#[LanguageLevelTypeAware(['8.3' => 'DOMNode|null'], default: 'DOMNode')] $otherNode) {} - /** - * @since 8.3 - */ - public function isEqualNode(?DOMNode $otherNode): bool {} - - /** - * @param $feature - * @param $version - * @return mixed - */ public function getFeature($feature, $version) {} - /** - * @param $key - * @param $data - * @param $handler - */ public function setUserData($key, $data, $handler) {} - /** - * @param $key - * @return mixed - */ public function getUserData($key) {} /** diff --git a/standard/standard_8.php b/standard/standard_8.php index 643f60961..a24464d97 100644 --- a/standard/standard_8.php +++ b/standard/standard_8.php @@ -61,14 +61,14 @@ *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function syslog(int $priority, string $message): bool {} +function syslog(int $priority, string $message) {} /** * Close connection to system logger * @link https://php.net/manual/en/function.closelog.php */ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function closelog(): bool {} +function closelog() {} /** * Registers a function that will be called when PHP starts sending output. @@ -395,7 +395,7 @@ function ob_list_handlers(): array {} *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function ksort(array &$array, int $flags = SORT_REGULAR): bool {} +function ksort(array &$array, int $flags = SORT_REGULAR) {} /** * Sort an array by key in reverse order @@ -410,7 +410,7 @@ function ksort(array &$array, int $flags = SORT_REGULAR): bool {} *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function krsort(array &$array, int $flags = SORT_REGULAR): bool {} +function krsort(array &$array, int $flags = SORT_REGULAR) {} /** * Sort an array using a "natural order" algorithm @@ -460,7 +460,7 @@ function asort(array &$array, int $flags = SORT_REGULAR) {} *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function arsort(array &$array, int $flags = SORT_REGULAR): bool {} +function arsort(array &$array, int $flags = SORT_REGULAR) {} /** * Sort an array @@ -478,7 +478,7 @@ function arsort(array &$array, int $flags = SORT_REGULAR): bool {} * (don't change types)

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function sort(array &$array, int $flags = SORT_REGULAR): bool {} +function sort(array &$array, int $flags = SORT_REGULAR) {} /** * Sort an array in reverse order @@ -508,7 +508,7 @@ function rsort(array &$array, int $flags = SORT_REGULAR) {} *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function usort(array &$array, callable $callback): bool {} +function usort(array &$array, callable $callback) {} /** * Sort an array with a user-defined comparison function and maintain index association @@ -522,7 +522,7 @@ function usort(array &$array, callable $callback): bool {} *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function uasort(array &$array, callable $callback): bool {} +function uasort(array &$array, callable $callback) {} /** * Sort an array by keys using a user-defined comparison function @@ -543,7 +543,7 @@ function uasort(array &$array, callable $callback): bool {} *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function uksort(array &$array, callable $callback): bool {} +function uksort(array &$array, callable $callback) {} /** * Shuffle an array @@ -553,7 +553,7 @@ function uksort(array &$array, callable $callback): bool {} *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function shuffle(array &$array): bool {} +function shuffle(array &$array) {} /** * Apply a user function to every member of an array @@ -587,7 +587,7 @@ function shuffle(array &$array): bool {} *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function array_walk(object|array &$array, callable $callback, mixed $arg): bool {} +function array_walk(object|array &$array, callable $callback, mixed $arg) {} /** * Apply a user function recursively to every member of an array @@ -615,7 +615,7 @@ function array_walk(object|array &$array, callable $callback, mixed $arg): bool *

*/ #[LanguageLevelTypeAware(['8.2' => 'true'], default: 'bool')] -function array_walk_recursive(object|array &$array, callable $callback, mixed $arg): bool {} +function array_walk_recursive(object|array &$array, callable $callback, mixed $arg) {} /** * Counts all elements in an array, or something in an object. From d0fd8b58da2b441a273518348a9cf5114cd77517 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Tue, 29 Aug 2023 13:40:26 +0200 Subject: [PATCH 39/73] [phpstorm-stubs] Updated parameters for some functions in gd.php, odbc.php and xdebug.php. --- gd/gd.php | 20 +++++++-------- odbc/odbc.php | 62 ++++++++++++++++++++++++++++------------------- xdebug/xdebug.php | 2 +- 3 files changed, 48 insertions(+), 36 deletions(-) diff --git a/gd/gd.php b/gd/gd.php index a17deb3f5..81cfc892e 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -1038,7 +1038,7 @@ function imagepng(GdImage $image, $file = null, int $quality = -1, int $filters * @return bool true on success or false on failure. * @since 5.4 */ -function imagewebp($image, $to = null, $quality = 80): bool {} +function imagewebp($image, $to = null, $quality = -1): bool {} /** * Output image to browser or file @@ -1071,7 +1071,7 @@ function imagegif(GdImage $image, $file = null): bool {} *

* @return bool true on success or false on failure. */ -function imagejpeg($image, $file = null, $quality = null): bool {} +function imagejpeg($image, $file = null, $quality = -1): bool {} /** * Output image to browser or file @@ -1121,7 +1121,7 @@ function imagegd(GdImage $image, ?string $file = null): bool {} *

* @return bool true on success or false on failure. */ -function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = IMG_GD2_RAW): bool {} +function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = null, int $mode = null): bool {} /** * Destroy an image @@ -1618,7 +1618,7 @@ function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int * corner seeing the text horizontally. */ #[Pure] -function imagettfbbox($size, $angle, $font_filename, $text) {} +function imagettfbbox($size, $angle, $font_filename, $text, array $options = []) {} /** * Write text to the image using TrueType fonts @@ -1729,10 +1729,10 @@ function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, * search for files that do not begin with a leading '/' by appending * '.ttf' to the filename and searching along a library-defined font path. *

- * @param string $text

+ * @param string $string

* The string to be measured. *

- * @param array $extrainfo [optional]

+ * @param array $options [optional]

* * Possible array indexes for extrainfo * @@ -1790,7 +1790,7 @@ function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, * Returns false on error. */ #[Pure] -function imageftbbox($size, $angle, $font_filename, $text, $extrainfo = null) {} +function imageftbbox($size, $angle, $font_filename, $string, $options = []) {} /** * Write text to the image using fonts using FreeType 2 @@ -1855,10 +1855,10 @@ function imageftbbox($size, $angle, $font_filename, $text, $extrainfo = null) {} * Note: * open_basedir does not apply to font_filename. *

- * @param string $text

+ * @param string $string

* Text to be inserted into image. *

- * @param array $extrainfo [optional]

+ * @param array $options [optional]

*

* Possible array indexes for extrainfo * @@ -1908,7 +1908,7 @@ function imageftbbox($size, $angle, $font_filename, $text, $extrainfo = null) {} * * Returns false on error. */ -function imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $extrainfo = null) {} +function imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $string, $options = []) {} /** * Load a PostScript Type 1 font from file diff --git a/odbc/odbc.php b/odbc/odbc.php index 85af5b678..ad8e6ba61 100644 --- a/odbc/odbc.php +++ b/odbc/odbc.php @@ -124,7 +124,7 @@ function odbc_commit($connection_id) {} * @param string $password

* The password. *

- * @param int $cursor_type [optional]

+ * @param int $cursor_option [optional]

* This sets the type of cursor to be used * for this connection. This parameter is not normally needed, but * can be useful for working around problems with some ODBC drivers. @@ -135,7 +135,7 @@ function odbc_commit($connection_id) {} *

* @return resource|false an ODBC connection or (FALSE) on error. */ -function odbc_connect($dsn, $user, $password, $cursor_type = null) {} +function odbc_connect($dsn, $user, $password, $cursor_option = SQL_CUR_USE_DRIVER) {} /** * Get cursorname @@ -166,10 +166,10 @@ function odbc_data_source($connection_id, $fetch_type) {} /** * Execute a prepared statement * @link https://php.net/manual/en/function.odbc-execute.php - * @param resource $result_id

+ * @param resource $statement

* The result id resource, from odbc_prepare. *

- * @param array $parameters_array [optional]

+ * @param array $params [optional]

* Parameters in parameter_array will be * substituted for placeholders in the prepared statement in order. * Elements of this array will be converted to strings by calling this @@ -189,7 +189,7 @@ function odbc_data_source($connection_id, $fetch_type) {} * executing the query directly with odbc_exec). * @return bool TRUE on success or FALSE on failure. */ -function odbc_execute($result_id, array $parameters_array = null) {} +function odbc_execute($statement, array $params = []) {} /** * Get the last error code @@ -240,30 +240,30 @@ function odbc_exec($connection_id, $query_string, #[PhpStormStubsElementAvailabl /** * Fetch a result row as an associative array * @link https://php.net/manual/en/function.odbc-fetch-array.php - * @param resource $result

+ * @param resource $statement

* The result resource from odbc_exec. *

- * @param int $rownumber [optional]

+ * @param int $row [optional]

* Optionally choose which row number to retrieve. *

* @return array|false an array that corresponds to the fetched row, or FALSE if there * are no more rows. */ -function odbc_fetch_array($result, $rownumber = null) {} +function odbc_fetch_array($statement, $row = -1) {} /** * Fetch a result row as an object * @link https://php.net/manual/en/function.odbc-fetch-object.php - * @param resource $result

+ * @param resource $statement

* The result resource from odbc_exec. *

- * @param int $rownumber [optional]

+ * @param int $row [optional]

* Optionally choose which row number to retrieve. *

* @return object|false an object that corresponds to the fetched row, or FALSE if there * are no more rows. */ -function odbc_fetch_object($result, $rownumber = null) {} +function odbc_fetch_object($statement, $row = -1) {} /** * Fetch a row @@ -293,22 +293,22 @@ function odbc_fetch_row($result_id, $row_number = null) {} /** * Fetch one result row into array * @link https://php.net/manual/en/function.odbc-fetch-into.php - * @param resource $result_id

+ * @param resource $statement

* The result resource. *

- * @param array &$result_array

+ * @param array &$array

* The result array * that can be of any type since it will be converted to type * array. The array will contain the column values starting at array * index 0. *

- * @param int $rownumber [optional]

+ * @param int $row [optional]

* The row number. *

* @return int the number of columns in the result; * FALSE on error. */ -function odbc_fetch_into($result_id, array &$result_array, $rownumber = null) {} +function odbc_fetch_into($statement, array &$array, $row = 0) {} /** * Get the length (precision) of a field @@ -389,7 +389,7 @@ function odbc_free_result($result_id) {} /** * Retrieves information about data types supported by the data source * @link https://php.net/manual/en/function.odbc-gettypeinfo.php - * @param resource $connection_id

The ODBC connection identifier, + * @param resource $odbc

The ODBC connection identifier, * see odbc_connect for details.

* @param int $data_type [optional]

* The data type, which can be used to restrict the information to a @@ -419,7 +419,7 @@ function odbc_free_result($result_id) {} * The result set is ordered by DATA_TYPE and TYPE_NAME. *

*/ -function odbc_gettypeinfo($connection_id, $data_type = null) {} +function odbc_gettypeinfo($odbc, $data_type = 0) {} /** * Handling of LONG columns @@ -473,11 +473,11 @@ function odbc_num_rows($result_id) {} * @param string $dsn * @param string $user * @param string $password - * @param int $cursor_type [optional] + * @param int $cursor_option [optional] * @return resource|false an ODBC connection id or 0 (FALSE) on * error. */ -function odbc_pconnect($dsn, $user, $password, $cursor_type = null) {} +function odbc_pconnect($dsn, $user, $password, $cursor_option = SQL_CUR_USE_DRIVER) {} /** * Prepares a statement for execution @@ -511,7 +511,7 @@ function odbc_result($result_id, $field) {} /** * Print result as HTML table * @link https://php.net/manual/en/function.odbc-result-all.php - * @param resource $result_id

+ * @param resource $statement

* The result identifier. *

* @param string $format [optional]

@@ -520,7 +520,7 @@ function odbc_result($result_id, $field) {} * @return int|false the number of rows in the result or FALSE on error. * @deprecated 8.1 */ -function odbc_result_all($result_id, $format = null) {} +function odbc_result_all($statement, $format = '') {} /** * Rollback a transaction @@ -827,8 +827,13 @@ function odbc_foreignkeys($connection_id, $pk_qualifier, $pk_owner, $pk_table, $ /** * Get the list of procedures stored in a specific data source * @link https://php.net/manual/en/function.odbc-procedures.php - * @param resource $connection_id

The ODBC connection identifier, + * @param resource $odbc

The ODBC connection identifier, * see odbc_connect for details.

+ * @param string|null $catalog

The catalog ('qualifier' in ODBC 2 parlance).

+ * @param string|null $schema

The schema ('owner' in ODBC 2 parlance). This parameter accepts the + * following search patterns: % to match zero or more characters, and _ to match a single character.

+ * @param string|null $procedure

The proc. This parameter accepts the following search patterns: + * % to match zero or more characters, and _ to match a single character.

* @return resource|false

an ODBC * result identifier containing the information or FALSE on failure. *

@@ -844,13 +849,20 @@ function odbc_foreignkeys($connection_id, $pk_qualifier, $pk_owner, $pk_table, $ * PROCEDURE_TYPE *

*/ -function odbc_procedures($connection_id) {} +function odbc_procedures($odbc, $catalog = null, $schema = null, $procedure = null) {} /** * Retrieve information about parameters to procedures * @link https://php.net/manual/en/function.odbc-procedurecolumns.php - * @param resource $connection_id

The ODBC connection identifier, + * @param resource $odbc

The ODBC connection identifier, * see odbc_connect for details.

+ * @param string|null $catalog

The catalog ('qualifier' in ODBC 2 parlance).

+ * @param string|null $schema

The schema ('owner' in ODBC 2 parlance). This parameter accepts the + * following search patterns: % to match zero or more characters, and _ to match a single character.

+ * @param string|null $procedure

The proc. This parameter accepts the following search patterns: + * % to match zero or more characters, and _ to match a single character.

+ * @param string|null $column

The column. This parameter accepts the following search patterns: + * % to match zero or more characters, and _ to match a single character.

* @return resource|false

the list of input and output parameters, as well as the * columns that make up the result set for the specified procedures. * Returns an ODBC result identifier or FALSE on failure. @@ -872,7 +884,7 @@ function odbc_procedures($connection_id) {} * REMARKS *

*/ -function odbc_procedurecolumns($connection_id) {} +function odbc_procedurecolumns($odbc, $catalog = null, $schema = null, $procedure = null, $column = null) {} /** * Alias of odbc_exec diff --git a/xdebug/xdebug.php b/xdebug/xdebug.php index e4e68a8ad..c4e4b55db 100644 --- a/xdebug/xdebug.php +++ b/xdebug/xdebug.php @@ -3,7 +3,7 @@ /** * Show diagnostic information */ -function xdebug_info(string $category = '') {} +function xdebug_info(string $category = 'null') {} /** * Returns an array of ALL valid ini options with values and is not the same as ini_get_all() which returns only From dbc54fa39ea16aea51b968f80d806365d69df561 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Wed, 30 Aug 2023 13:27:04 +0200 Subject: [PATCH 40/73] [phpstorm-stubs] Updated dockerfiles to make gd extension work. --- tests/DockerImages/5.6/Dockerfile | 4 +++- tests/DockerImages/7.0/Dockerfile | 4 +++- tests/DockerImages/7.1/Dockerfile | 4 +++- tests/DockerImages/7.2/Dockerfile | 4 +++- tests/DockerImages/7.3/Dockerfile | 4 +++- tests/DockerImages/7.4/Dockerfile | 4 +++- tests/DockerImages/8.0/Dockerfile | 4 +++- tests/DockerImages/8.1/Dockerfile | 4 +++- tests/DockerImages/8.2/Dockerfile | 4 +++- tests/DockerImages/8.3/Dockerfile | 4 +++- 10 files changed, 30 insertions(+), 10 deletions(-) diff --git a/tests/DockerImages/5.6/Dockerfile b/tests/DockerImages/5.6/Dockerfile index 5592f32d0..13508fded 100644 --- a/tests/DockerImages/5.6/Dockerfile +++ b/tests/DockerImages/5.6/Dockerfile @@ -4,7 +4,9 @@ RUN set -eux; \ bash gcc g++ make autoconf pkgconfig git \ libmcrypt-dev imap-dev php7-imap php7-enchant bzip2-dev gettext-dev libxml2-dev php7-dev php7-gd icu-dev \ php7-zip php7-tidy php7-intl libffi-dev openssl-dev php7-pear rabbitmq-c librrd libzip-dev rrdtool-dev \ - gmp-dev yaml yaml-dev fann fann-dev + gmp-dev yaml yaml-dev fann fann-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-webp-dir=/usr --with-jpeg-dir=/usr RUN docker-php-ext-install imap gmp sockets intl bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap diff --git a/tests/DockerImages/7.0/Dockerfile b/tests/DockerImages/7.0/Dockerfile index a87b4db5b..c64e62f07 100644 --- a/tests/DockerImages/7.0/Dockerfile +++ b/tests/DockerImages/7.0/Dockerfile @@ -5,7 +5,9 @@ RUN set -eux; \ bash gcc g++ make autoconf pkgconfig git \ libmcrypt-dev imap-dev php7-imap php7-enchant bzip2-dev gettext-dev libxml2-dev php7-dev php7-gd icu-dev \ php7-zip php7-tidy php7-intl libffi-dev openssl-dev php7-pear rabbitmq-c librrd libzip-dev rrdtool-dev \ - gmp-dev yaml yaml-dev fann fann-dev aspell-dev + gmp-dev yaml yaml-dev fann fann-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-webp-dir=/usr --with-jpeg-dir=/usr RUN docker-php-ext-install imap gmp sockets intl bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pspell diff --git a/tests/DockerImages/7.1/Dockerfile b/tests/DockerImages/7.1/Dockerfile index da6e1de44..c83a52753 100644 --- a/tests/DockerImages/7.1/Dockerfile +++ b/tests/DockerImages/7.1/Dockerfile @@ -6,7 +6,9 @@ RUN set -eux; \ libmcrypt-dev imap-dev php7-imap php7-enchant bzip2-dev gettext-dev libxml2-dev php7-dev php7-gd icu-dev \ php7-zip php7-tidy php7-intl libffi-dev openssl-dev php7-pear rabbitmq-c rabbitmq-c-dev librrd \ libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ - libpng-dev gpgme gpgme-dev aspell-dev + libpng-dev gpgme gpgme-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-webp-dir=/usr --with-jpeg-dir=/usr RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pspell diff --git a/tests/DockerImages/7.2/Dockerfile b/tests/DockerImages/7.2/Dockerfile index 1d4611948..59925d362 100644 --- a/tests/DockerImages/7.2/Dockerfile +++ b/tests/DockerImages/7.2/Dockerfile @@ -6,7 +6,9 @@ RUN set -eux; \ libmcrypt-dev imap-dev php7-imap php7-enchant bzip2-dev gettext-dev libxml2-dev php7-dev php7-gd icu-dev \ php7-zip php7-tidy php7-intl libffi-dev openssl-dev php7-pear rabbitmq-c rabbitmq-c-dev librrd \ libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ - libpng-dev gpgme gpgme-dev aspell-dev + libpng-dev gpgme gpgme-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-webp-dir=/usr --with-jpeg-dir=/usr RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pspell diff --git a/tests/DockerImages/7.3/Dockerfile b/tests/DockerImages/7.3/Dockerfile index 307861dcf..0bdc1fa1d 100644 --- a/tests/DockerImages/7.3/Dockerfile +++ b/tests/DockerImages/7.3/Dockerfile @@ -6,7 +6,9 @@ RUN set -eux; \ libmcrypt-dev imap-dev php7-imap enchant2 php8-enchant bzip2-dev gettext-dev libxml2-dev php7-dev php7-gd icu-dev \ php7-zip php7-tidy php7-intl libffi-dev openssl-dev php7-pear rabbitmq-c rabbitmq-c-dev librrd \ libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ - libpng-dev gpgme gpgme-dev libpq-dev aspell-dev + libpng-dev gpgme gpgme-dev libpq-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-webp-dir=/usr --with-jpeg-dir=/usr RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pgsql pspell diff --git a/tests/DockerImages/7.4/Dockerfile b/tests/DockerImages/7.4/Dockerfile index d99adbfd3..22f747e60 100644 --- a/tests/DockerImages/7.4/Dockerfile +++ b/tests/DockerImages/7.4/Dockerfile @@ -6,7 +6,9 @@ RUN set -eux; \ libmcrypt-dev imap-dev enchant2 php8-enchant bzip2-dev gettext-dev libxml2-dev icu-dev \ libffi-dev openssl-dev rabbitmq-c rabbitmq-c-dev librrd \ libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ - libpng-dev gpgme gpgme-dev libpq-dev aspell-dev + libpng-dev gpgme gpgme-dev libpq-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-jpeg --with-webp --with-freetype RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pgsql pspell diff --git a/tests/DockerImages/8.0/Dockerfile b/tests/DockerImages/8.0/Dockerfile index 709315711..30d3f3f02 100644 --- a/tests/DockerImages/8.0/Dockerfile +++ b/tests/DockerImages/8.0/Dockerfile @@ -6,7 +6,9 @@ RUN set -eux; \ libmcrypt-dev imap-dev php8-imap enchant2 php8-enchant bzip2-dev gettext-dev libxml2-dev php8-dev php8-gd icu-dev \ php8-zip php8-tidy php8-intl libffi-dev openssl-dev php8-pear rabbitmq-c rabbitmq-c-dev librrd \ libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ - libpng-dev gpgme gpgme-dev libpq-dev aspell-dev + libpng-dev gpgme gpgme-dev libpq-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-jpeg --with-webp --with-freetype RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pgsql pspell diff --git a/tests/DockerImages/8.1/Dockerfile b/tests/DockerImages/8.1/Dockerfile index d6b728277..c4223ee08 100644 --- a/tests/DockerImages/8.1/Dockerfile +++ b/tests/DockerImages/8.1/Dockerfile @@ -6,7 +6,9 @@ RUN set -eux; \ libmcrypt-dev imap-dev php-imap enchant2 php-enchant bzip2-dev gettext-dev libxml2-dev php81-dev php-gd icu-dev \ php-zip php-tidy php-intl libffi-dev openssl-dev php81-pear rabbitmq-c rabbitmq-c-dev librrd \ libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ - libpng-dev gpgme gpgme-dev libpq-dev aspell-dev + libpng-dev gpgme gpgme-dev libpq-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-jpeg --with-webp --with-freetype RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pgsql pspell diff --git a/tests/DockerImages/8.2/Dockerfile b/tests/DockerImages/8.2/Dockerfile index 9d60d7554..010d6c073 100644 --- a/tests/DockerImages/8.2/Dockerfile +++ b/tests/DockerImages/8.2/Dockerfile @@ -6,7 +6,9 @@ RUN set -eux; \ libmcrypt-dev imap-dev php-imap enchant2 php-enchant bzip2-dev gettext-dev libxml2-dev php82-dev php-gd icu-dev \ php-zip php-tidy php-intl libffi-dev openssl-dev php82-pear rabbitmq-c rabbitmq-c-dev librrd \ libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ - libpng-dev gpgme gpgme-dev libpq-dev aspell-dev + libpng-dev gpgme gpgme-dev libpq-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-jpeg --with-webp --with-freetype RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pgsql pspell diff --git a/tests/DockerImages/8.3/Dockerfile b/tests/DockerImages/8.3/Dockerfile index 766eb15a0..4759154c1 100644 --- a/tests/DockerImages/8.3/Dockerfile +++ b/tests/DockerImages/8.3/Dockerfile @@ -6,7 +6,9 @@ RUN set -eux; \ libmcrypt-dev imap-dev php-imap enchant2 php-enchant bzip2-dev gettext-dev libxml2-dev php82-dev php-gd icu-dev \ php-zip php-tidy php-intl libffi-dev openssl-dev php82-pear rabbitmq-c rabbitmq-c-dev librrd \ libzip-dev rrdtool-dev gmp-dev yaml yaml-dev fann fann-dev openldap-dev librdkafka librdkafka-dev libcurl curl-dev \ - libpng-dev gpgme gpgme-dev libpq-dev aspell-dev + libpng-dev gpgme gpgme-dev libpq-dev aspell-dev libjpeg-turbo-dev libpng-dev libwebp-dev freetype-dev + +RUN docker-php-ext-configure gd --with-jpeg --with-webp --with-freetype RUN docker-php-ext-install imap gmp sockets intl gd ldap bz2 mysqli bcmath calendar dba exif gettext opcache pcntl \ pdo_mysql shmop sysvmsg sysvsem sysvshm xml soap pgsql pspell From cbdf0aa301e1507081b86f610dd7445867db3d30 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Wed, 30 Aug 2023 15:14:32 +0200 Subject: [PATCH 41/73] [phpstorm-stubs] Attempt to fix methods signature according to tests failures. --- gd/gd.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/gd/gd.php b/gd/gd.php index 81cfc892e..b2761404b 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -1028,9 +1028,9 @@ function imagepng(GdImage $image, $file = null, int $quality = -1, int $filters * Output a WebP image to browser or file * @link https://php.net/manual/en/function.imagewebp.php * @param resource|GdImage $image - * @param string $to [optional]

- * The path to save the file to. If not set or null, the raw image stream - * will be outputted directly. + * @param resource|string|null $file [optional]

+ * The path or an open stream resource (which is automatically closed after this function returns) + * to save the file to. If not set or null, the raw image stream will be output directly. *

* @param int $quality [optional]

* quality ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). @@ -1038,7 +1038,7 @@ function imagepng(GdImage $image, $file = null, int $quality = -1, int $filters * @return bool true on success or false on failure. * @since 5.4 */ -function imagewebp($image, $to = null, $quality = -1): bool {} +function imagewebp(GdImage $image, $file = null, int $quality = -1): bool {} /** * Output image to browser or file @@ -1071,7 +1071,7 @@ function imagegif(GdImage $image, $file = null): bool {} *

* @return bool true on success or false on failure. */ -function imagejpeg($image, $file = null, $quality = -1): bool {} +function imagejpeg(GdImage $image, $file = null, int $quality = -1): bool {} /** * Output image to browser or file @@ -1569,9 +1569,10 @@ function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int * search for files that do not begin with a leading '/' by appending * '.ttf' to the filename and searching along a library-defined font path. *

- * @param string $text

+ * @param string $string

* The string to be measured. *

+ * @param array $options [optional] * @return array|false imagettfbbox returns an array with 8 * elements representing four points making the bounding box of the * text on success and false on error. @@ -1618,7 +1619,7 @@ function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int * corner seeing the text horizontally. */ #[Pure] -function imagettfbbox($size, $angle, $font_filename, $text, array $options = []) {} +function imagettfbbox(float $size, float $angle, string $font_filename, string $string, #[PhpStormStubsElementAvailable(from: '8.0')] $options = []): array|false {} /** * Write text to the image using TrueType fonts @@ -1703,6 +1704,7 @@ function imagettfbbox($size, $angle, $font_filename, $text, array $options = []) * If a character is used in the string which is not supported by the * font, a hollow rectangle will replace the character. *

+ * @param array $options [optional] * @return array|false an array with 8 elements representing four points making the * bounding box of the text. The order of the points is lower left, lower * right, upper right, upper left. The points are relative to the text @@ -1710,7 +1712,7 @@ function imagettfbbox($size, $angle, $font_filename, $text, array $options = []) * corner when you see the text horizontally. * Returns false on error. */ -function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {} +function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, #[PhpStormStubsElementAvailable(from: '8.0')] array $options = []): array|false {} /** * Give the bounding box of a text using fonts via freetype2 @@ -1790,7 +1792,7 @@ function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, * Returns false on error. */ #[Pure] -function imageftbbox($size, $angle, $font_filename, $string, $options = []) {} +function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {} /** * Write text to the image using fonts using FreeType 2 @@ -1855,7 +1857,7 @@ function imageftbbox($size, $angle, $font_filename, $string, $options = []) {} * Note: * open_basedir does not apply to font_filename. *

- * @param string $string

+ * @param string $text

* Text to be inserted into image. *

* @param array $options [optional]

@@ -1908,7 +1910,7 @@ function imageftbbox($size, $angle, $font_filename, $string, $options = []) {} * * Returns false on error. */ -function imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $string, $options = []) {} +function imagefttext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {} /** * Load a PostScript Type 1 font from file From 788fdbd7f5e154d0958177c7f66336ae335be084 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Wed, 30 Aug 2023 16:46:42 +0200 Subject: [PATCH 42/73] [phpstorm-stubs] Last fix for typehint for imagettfbbox(). --- gd/gd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gd/gd.php b/gd/gd.php index b2761404b..f3edfff20 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -1619,7 +1619,7 @@ function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int * corner seeing the text horizontally. */ #[Pure] -function imagettfbbox(float $size, float $angle, string $font_filename, string $string, #[PhpStormStubsElementAvailable(from: '8.0')] $options = []): array|false {} +function imagettfbbox(float $size, float $angle, string $font_filename, string $string, #[PhpStormStubsElementAvailable(from: '8.0')] array $options = []): array|false {} /** * Write text to the image using TrueType fonts From b0379181588d359718118c96167ada85cd8a2996 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Wed, 30 Aug 2023 17:08:16 +0200 Subject: [PATCH 43/73] [phpstorm-stubs] Added default values for parameters in imagegd2(). --- gd/gd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gd/gd.php b/gd/gd.php index f3edfff20..43068286e 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -1121,7 +1121,7 @@ function imagegd(GdImage $image, ?string $file = null): bool {} *

* @return bool true on success or false on failure. */ -function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = null, int $mode = null): bool {} +function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = IMG_GD2_RAW): bool {} /** * Destroy an image From b54361f8aeb92289d52152beb64b6efbaff9f284 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Mon, 4 Sep 2023 16:05:10 +0200 Subject: [PATCH 44/73] [phpstorm-stubs] WI-73720 added meta key for $flag param in json_validate(). --- meta/.phpstorm.meta.php | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/.phpstorm.meta.php b/meta/.phpstorm.meta.php index 63a56fe32..3180e0a99 100644 --- a/meta/.phpstorm.meta.php +++ b/meta/.phpstorm.meta.php @@ -549,6 +549,7 @@ function argumentsSet($setName) { expectedArguments(\json_encode(), 1, JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_FORCE_OBJECT | JSON_PRESERVE_ZERO_FRACTION | JSON_UNESCAPED_UNICODE | JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_UNESCAPED_LINE_TERMINATORS | JSON_THROW_ON_ERROR); expectedArguments(\json_decode(), 3, JSON_BIGINT_AS_STRING | JSON_OBJECT_AS_ARRAY | JSON_THROW_ON_ERROR); + expectedArguments(\json_validate(), 2, JSON_INVALID_UTF8_IGNORE); expectedArguments(\idn_to_ascii(), 1, IDNA_ALLOW_UNASSIGNED | IDNA_CHECK_BIDI | IDNA_CHECK_CONTEXTJ | IDNA_DEFAULT | IDNA_NONTRANSITIONAL_TO_ASCII | IDNA_NONTRANSITIONAL_TO_UNICODE | IDNA_USE_STD3_RULES); expectedArguments(\idn_to_ascii(), 2, INTL_IDNA_VARIANT_UTS46, INTL_IDNA_VARIANT_2003); From 60ce5a809469bc93f912961466cfa9fb6764803d Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Thu, 7 Sep 2023 08:37:58 +0200 Subject: [PATCH 45/73] [phpstorm-stubs] update 8.3 image to RC 1 --- tests/DockerImages/8.3/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/DockerImages/8.3/Dockerfile b/tests/DockerImages/8.3/Dockerfile index 4759154c1..648f1f1d8 100644 --- a/tests/DockerImages/8.3/Dockerfile +++ b/tests/DockerImages/8.3/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.3.0beta3-alpine +FROM php:8.3.0RC1-alpine RUN set -eux; \ apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community --no-cache --virtual .build-deps \ From f4839a44ca1292a163f7fae067cffc0447360cad Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Thu, 7 Sep 2023 08:42:15 +0200 Subject: [PATCH 46/73] [phpstorm-stubs] update test_runner image to 8.3 RC 1 --- tests/DockerImages/testRunner/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/DockerImages/testRunner/Dockerfile b/tests/DockerImages/testRunner/Dockerfile index 244e1897c..9c724b1e4 100644 --- a/tests/DockerImages/testRunner/Dockerfile +++ b/tests/DockerImages/testRunner/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.3.0beta3-apache +FROM php:8.3.0RC1-apache RUN echo 'memory_limit = 1024M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini COPY --from=composer /usr/bin/composer /usr/bin/composer From 9f2e130553d125e84dc5c5acef0d43c132ecffb4 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Thu, 7 Sep 2023 08:46:31 +0200 Subject: [PATCH 47/73] [phpstorm-stubs] use composer install instead of composer update and install versions according to composer.lock --- .github/workflows/main.yml | 2 +- .gitignore | 1 - composer.lock | 4035 ++++++++++++++++++++++++++++++++++++ 3 files changed, 4036 insertions(+), 2 deletions(-) create mode 100644 composer.lock diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 473dddb81..605eca11f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: PHP_VERSION: ${{matrix.php}} - name: Composer Install - run: docker-compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} test_runner composer update + run: docker-compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} test_runner composer install env: PHP_VERSION: ${{matrix.php}} diff --git a/.gitignore b/.gitignore index bc8b7a41d..d55334171 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ phpunit.xml # Composer vendor -composer.lock .php_cs.cache .phpunit.result.cache diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..7d97231b3 --- /dev/null +++ b/composer.lock @@ -0,0 +1,4035 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "ec72442e7a7b8890b4a3053a66ea2692", + "packages": [], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "composer/semver", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-04-01T19:23:25+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "doctrine/annotations", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2 || ^3", + "ext-tokenizer": "*", + "php": "^7.2 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/2.0.1" + }, + "time": "2023-02-02T22:02:53+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" + }, + "time": "2023-06-03T09:27:29+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "84a527db05647743d50373e0ec53a152f2cde568" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", + "reference": "84a527db05647743d50373e0ec53a152f2cde568", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-15T16:57:16+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.17.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "3f0ed862f22386c55a767461ef5083bddceeed79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3f0ed862f22386c55a767461ef5083bddceeed79", + "reference": "3f0ed862f22386c55a767461ef5083bddceeed79", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "composer/xdebug-handler": "^3.0.3", + "doctrine/annotations": "^2", + "doctrine/lexer": "^2 || ^3", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0", + "sebastian/diff": "^4.0 || ^5.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/polyfill-mbstring": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27", + "symfony/process": "^5.4 || ^6.0", + "symfony/stopwatch": "^5.4 || ^6.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.0", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.5.3", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.16", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", + "symfony/phpunit-bridge": "^6.2.3", + "symfony/yaml": "^5.4 || ^6.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.17.0" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2023-05-22T19:59:32+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.15.5", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + }, + "time": "2023-05-19T20:20:00+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.7.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", + "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" + }, + "time": "2023-05-30T18:13:47+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.22.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", + "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.0" + }, + "time": "2023-06-01T12:35:21+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.26", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.15", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-03-06T12:58:08+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "a9aceaf20a682aeacf28d582654a1670d8826778" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778", + "reference": "a9aceaf20a682aeacf28d582654a1670d8826778", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-06-11T06:13:56+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:35:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-29T12:49:39+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-21T14:41:17+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "97b698e1d77d356304def77a8d0cd73090b359ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/97b698e1d77d356304def77a8d0cd73090b359ea", + "reference": "97b698e1d77d356304def77a8d0cd73090b359ea", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-30T17:12:32+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-02T01:25:41+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-12T14:21:09+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/process", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-19T08:06:44+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-16T10:14:28+00:00" + }, + { + "name": "symfony/string", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-21T21:06:29+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "nikic/php-parser": 0, + "phpdocumentor/reflection-docblock": 0, + "friendsofphp/php-cs-fixer": 0 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": { + "php": "^8.0" + }, + "plugin-api-version": "2.3.0" +} From f0db768c518e605e54506aac2fdffcd55667e3ee Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Thu, 7 Sep 2023 12:16:08 +0200 Subject: [PATCH 48/73] [phpstorm-stubs] update constants according to 8.3 RC 1 --- tokenizer/tokenizer.php | 292 ++++++++++++++++++++-------------------- 1 file changed, 146 insertions(+), 146 deletions(-) diff --git a/tokenizer/tokenizer.php b/tokenizer/tokenizer.php index b67d2c50f..977422615 100644 --- a/tokenizer/tokenizer.php +++ b/tokenizer/tokenizer.php @@ -43,190 +43,190 @@ function token_get_all(string $code, #[PhpStormStubsElementAvailable(from: '7.0' function token_name(int $id): string {} define('TOKEN_PARSE', 1); -define('T_REQUIRE_ONCE', 276); -define('T_REQUIRE', 275); -define('T_EVAL', 274); -define('T_INCLUDE_ONCE', 273); -define('T_INCLUDE', 272); -define('T_LOGICAL_OR', 277); -define('T_LOGICAL_XOR', 278); -define('T_LOGICAL_AND', 279); -define('T_PRINT', 280); -define('T_YIELD', 281); -define('T_DOUBLE_ARROW', 386); -define('T_YIELD_FROM', 282); -define('T_POW_EQUAL', 402); -define('T_SR_EQUAL', 362); -define('T_SL_EQUAL', 361); -define('T_XOR_EQUAL', 360); -define('T_OR_EQUAL', 359); -define('T_AND_EQUAL', 358); -define('T_MOD_EQUAL', 357); -define('T_CONCAT_EQUAL', 356); -define('T_DIV_EQUAL', 355); -define('T_MUL_EQUAL', 354); -define('T_MINUS_EQUAL', 353); -define('T_PLUS_EQUAL', 352); +define('T_REQUIRE_ONCE', 263); +define('T_REQUIRE', 262); +define('T_EVAL', 323); +define('T_INCLUDE_ONCE', 261); +define('T_INCLUDE', 260); +define('T_LOGICAL_OR', 264); +define('T_LOGICAL_XOR', 265); +define('T_LOGICAL_AND', 266); +define('T_PRINT', 267); +define('T_YIELD', 268); +define('T_DOUBLE_ARROW', 269); +define('T_YIELD_FROM', 270); +define('T_POW_EQUAL', 282); +define('T_SR_EQUAL', 281); +define('T_SL_EQUAL', 280); +define('T_XOR_EQUAL', 279); +define('T_OR_EQUAL', 278); +define('T_AND_EQUAL', 277); +define('T_MOD_EQUAL', 276); +define('T_CONCAT_EQUAL', 275); +define('T_DIV_EQUAL', 274); +define('T_MUL_EQUAL', 273); +define('T_MINUS_EQUAL', 272); +define('T_PLUS_EQUAL', 271); /** * @since 7.4 */ -define('T_COALESCE_EQUAL', 363); -define('T_COALESCE', 400); -define('T_BOOLEAN_OR', 364); -define('T_BOOLEAN_AND', 365); -define('T_SPACESHIP', 372); -define('T_IS_NOT_IDENTICAL', 369); -define('T_IS_IDENTICAL', 368); -define('T_IS_NOT_EQUAL', 367); -define('T_IS_EQUAL', 366); -define('T_IS_GREATER_OR_EQUAL', 371); -define('T_IS_SMALLER_OR_EQUAL', 370); -define('T_SR', 374); -define('T_SL', 373); -define('T_INSTANCEOF', 283); -define('T_UNSET_CAST', 383); -define('T_BOOL_CAST', 382); -define('T_OBJECT_CAST', 381); -define('T_ARRAY_CAST', 380); -define('T_STRING_CAST', 379); -define('T_DOUBLE_CAST', 378); -define('T_INT_CAST', 377); -define('T_DEC', 376); -define('T_INC', 375); -define('T_POW', 401); -define('T_CLONE', 285); -define('T_NEW', 284); -define('T_ELSEIF', 288); -define('T_ELSE', 289); -define('T_ENDIF', 290); -define('T_PUBLIC', 326); -define('T_PROTECTED', 325); -define('T_PRIVATE', 324); -define('T_FINAL', 323); -define('T_ABSTRACT', 322); -define('T_STATIC', 321); -define('T_LNUMBER', 260); -define('T_DNUMBER', 261); -define('T_STRING', 262); -define('T_VARIABLE', 266); -define('T_INLINE_HTML', 267); -define('T_ENCAPSED_AND_WHITESPACE', 268); -define('T_CONSTANT_ENCAPSED_STRING', 269); -define('T_STRING_VARNAME', 270); -define('T_NUM_STRING', 271); -define('T_EXIT', 286); -define('T_IF', 287); -define('T_ECHO', 291); -define('T_DO', 292); -define('T_WHILE', 293); -define('T_ENDWHILE', 294); -define('T_FOR', 295); -define('T_ENDFOR', 296); -define('T_FOREACH', 297); -define('T_ENDFOREACH', 298); -define('T_DECLARE', 299); -define('T_ENDDECLARE', 300); -define('T_AS', 301); -define('T_SWITCH', 302); -define('T_ENDSWITCH', 303); -define('T_CASE', 304); -define('T_DEFAULT', 305); -define('T_MATCH', 306); -define('T_BREAK', 307); -define('T_CONTINUE', 308); -define('T_GOTO', 309); -define('T_FUNCTION', 310); -define('T_CONST', 312); -define('T_RETURN', 313); -define('T_TRY', 314); -define('T_CATCH', 315); -define('T_FINALLY', 316); -define('T_THROW', 317); -define('T_USE', 318); -define('T_INSTEADOF', 319); -define('T_GLOBAL', 320); -define('T_VAR', 328); -define('T_UNSET', 329); -define('T_ISSET', 330); -define('T_EMPTY', 331); -define('T_HALT_COMPILER', 332); -define('T_CLASS', 333); -define('T_TRAIT', 334); -define('T_INTERFACE', 335); +define('T_COALESCE_EQUAL', 283); +define('T_COALESCE', 284); +define('T_BOOLEAN_OR', 285); +define('T_BOOLEAN_AND', 286); +define('T_SPACESHIP', 293); +define('T_IS_NOT_IDENTICAL', 292); +define('T_IS_IDENTICAL', 291); +define('T_IS_NOT_EQUAL', 290); +define('T_IS_EQUAL', 289); +define('T_IS_GREATER_OR_EQUAL', 295); +define('T_IS_SMALLER_OR_EQUAL', 294); +define('T_SR', 297); +define('T_SL', 296); +define('T_INSTANCEOF', 298); +define('T_UNSET_CAST', 305); +define('T_BOOL_CAST', 304); +define('T_OBJECT_CAST', 303); +define('T_ARRAY_CAST', 302); +define('T_STRING_CAST', 301); +define('T_DOUBLE_CAST', 300); +define('T_INT_CAST', 299); +define('T_DEC', 389); +define('T_INC', 388); +define('T_POW', 306); +define('T_CLONE', 307); +define('T_NEW', 324); +define('T_ELSEIF', 309); +define('T_ELSE', 310); +define('T_ENDIF', 327); +define('T_PUBLIC', 362); +define('T_PROTECTED', 361); +define('T_PRIVATE', 360); +define('T_FINAL', 359); +define('T_ABSTRACT', 358); +define('T_STATIC', 357); +define('T_LNUMBER', 311); +define('T_DNUMBER', 312); +define('T_STRING', 313); +define('T_VARIABLE', 317); +define('T_INLINE_HTML', 318); +define('T_ENCAPSED_AND_WHITESPACE', 319); +define('T_CONSTANT_ENCAPSED_STRING', 320); +define('T_STRING_VARNAME', 321); +define('T_NUM_STRING', 322); +define('T_EXIT', 325); +define('T_IF', 326); +define('T_ECHO', 328); +define('T_DO', 329); +define('T_WHILE', 320); +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_MATCH', 343); +define('T_BREAK', 344); +define('T_CONTINUE', 345); +define('T_GOTO', 346); +define('T_FUNCTION', 347); +define('T_CONST', 349); +define('T_RETURN', 350); +define('T_TRY', 351); +define('T_CATCH', 352); +define('T_FINALLY', 353); +define('T_THROW', 258); +define('T_USE', 354); +define('T_INSTEADOF', 355); +define('T_GLOBAL', 356); +define('T_VAR', 364); +define('T_UNSET', 365); +define('T_ISSET', 366); +define('T_EMPTY', 367); +define('T_HALT_COMPILER', 368); +define('T_CLASS', 369); +define('T_TRAIT', 370); +define('T_INTERFACE', 371); /** * @since 8.1 */ -define('T_ENUM', 336); -define('T_EXTENDS', 337); -define('T_IMPLEMENTS', 338); -define('T_OBJECT_OPERATOR', 384); -define('T_LIST', 340); -define('T_ARRAY', 341); -define('T_CALLABLE', 342); -define('T_LINE', 343); -define('T_FILE', 344); -define('T_DIR', 345); -define('T_CLASS_C', 346); -define('T_TRAIT_C', 347); -define('T_METHOD_C', 348); -define('T_FUNC_C', 349); -define('T_COMMENT', 387); -define('T_DOC_COMMENT', 388); -define('T_OPEN_TAG', 389); -define('T_OPEN_TAG_WITH_ECHO', 390); -define('T_CLOSE_TAG', 391); -define('T_WHITESPACE', 392); -define('T_START_HEREDOC', 393); -define('T_END_HEREDOC', 394); -define('T_DOLLAR_OPEN_CURLY_BRACES', 395); -define('T_CURLY_OPEN', 396); -define('T_PAAMAYIM_NEKUDOTAYIM', 397); -define('T_NAMESPACE', 339); -define('T_NS_C', 350); -define('T_NS_SEPARATOR', 398); -define('T_ELLIPSIS', 399); -define('T_DOUBLE_COLON', 397); +define('T_ENUM', 372); +define('T_EXTENDS', 373); +define('T_IMPLEMENTS', 374); +define('T_OBJECT_OPERATOR', 390); +define('T_LIST', 376); +define('T_ARRAY', 377); +define('T_CALLABLE', 378); +define('T_LINE', 379); +define('T_FILE', 380); +define('T_DIR', 381); +define('T_CLASS_C', 382); +define('T_TRAIT_C', 383); +define('T_METHOD_C', 384); +define('T_FUNC_C', 385); +define('T_COMMENT', 392); +define('T_DOC_COMMENT', 393); +define('T_OPEN_TAG', 394); +define('T_OPEN_TAG_WITH_ECHO', 395); +define('T_CLOSE_TAG', 396); +define('T_WHITESPACE', 397); +define('T_START_HEREDOC', 398); +define('T_END_HEREDOC', 399); +define('T_DOLLAR_OPEN_CURLY_BRACES', 400); +define('T_CURLY_OPEN', 401); +define('T_PAAMAYIM_NEKUDOTAYIM', 402); +define('T_NAMESPACE', 375); +define('T_NS_C', 386); +define('T_NS_SEPARATOR', 403); +define('T_ELLIPSIS', 404); +define('T_DOUBLE_COLON', 402); /** * @since 7.4 */ -define('T_FN', 311); +define('T_FN', 348); define('T_BAD_CHARACTER', 405); /** * @since 8.0 */ -define('T_NAME_FULLY_QUALIFIED', 263); +define('T_NAME_FULLY_QUALIFIED', 314); /** * @since 8.0 */ -define('T_NAME_RELATIVE', 264); +define('T_NAME_RELATIVE', 315); /** * @since 8.0 */ -define('T_NAME_QUALIFIED', 265); +define('T_NAME_QUALIFIED', 316); /** * @since 8.0 */ -define('T_ATTRIBUTE', 351); +define('T_ATTRIBUTE', 387); /** * @since 8.0 */ -define('T_NULLSAFE_OBJECT_OPERATOR', 385); +define('T_NULLSAFE_OBJECT_OPERATOR', 391); /** * @since 8.1 */ -define('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', 403); +define('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', 288); /** * @since 8.1 */ -define('T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', 404); +define('T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', 287); /** * @since 8.1 */ -define('T_READONLY', 327); +define('T_READONLY', 363); /** * @removed 7.0 From cd71853118bed99193186d6a52ed1c4181dea1da Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Thu, 7 Sep 2023 12:59:56 +0200 Subject: [PATCH 49/73] [phpstorm-stubs] add new parameter to strrchr https://github.com/php/php-src/pull/11430 --- standard/standard_1.php | 2 +- tokenizer/tokenizer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/standard/standard_1.php b/standard/standard_1.php index 592e90438..a657dbc46 100644 --- a/standard/standard_1.php +++ b/standard/standard_1.php @@ -355,7 +355,7 @@ function stristr(string $haystack, string $needle, bool $before_needle = false): *

*/ #[Pure] -function strrchr(string $haystack, string $needle): string|false {} +function strrchr(string $haystack, string $needle, #[PhpStormStubsElementAvailable(from: "8.3")] bool $before_needle = false): string|false {} /** * Randomly shuffles a string diff --git a/tokenizer/tokenizer.php b/tokenizer/tokenizer.php index 977422615..56a20a9ca 100644 --- a/tokenizer/tokenizer.php +++ b/tokenizer/tokenizer.php @@ -118,7 +118,7 @@ function token_name(int $id): string {} define('T_IF', 326); define('T_ECHO', 328); define('T_DO', 329); -define('T_WHILE', 320); +define('T_WHILE', 330); define('T_ENDWHILE', 331); define('T_FOR', 332); define('T_ENDFOR', 333); From f94b4fb19fa8ba216c7ece45c910618d5066209d Mon Sep 17 00:00:00 2001 From: LolGleb Date: Mon, 4 Sep 2023 14:34:19 +0200 Subject: [PATCH 50/73] [phpstorm-stubs] Fixed testMethodsDefaultParametersValue and added default values for parameters that missed it. --- Core/Core_c.php | 4 ++-- PDO/PDO.php | 8 +++---- Phar/Phar.php | 20 ++++++++-------- Reflection/ReflectionClass.php | 4 ++-- SPL/SPL.php | 4 ++-- SPL/SPL_c1.php | 8 +++---- curl/curl.php | 4 ++-- dom/dom_c.php | 22 ++++++++--------- fileinfo/fileinfo.php | 2 +- intl/intl.php | 24 +++++++++---------- mysqli/mysqli.php | 4 ++-- soap/soap.php | 16 ++++++------- sqlite3/sqlite3.php | 4 ++-- tests/AbstractBaseStubsTestCase.php | 11 +++++++++ tests/Model/BasePHPClass.php | 1 + .../ReflectionParametersProvider.php | 2 +- 16 files changed, 75 insertions(+), 63 deletions(-) diff --git a/Core/Core_c.php b/Core/Core_c.php index 37c779d17..07be080d3 100644 --- a/Core/Core_c.php +++ b/Core/Core_c.php @@ -606,8 +606,8 @@ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "", #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $code = 0, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $severity = 1, - #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = __FILE__, - #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $line = __LINE__, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $filename = null, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $line = null, #[LanguageLevelTypeAware(['8.0' => 'Throwable|null'], default: 'Throwable')] $previous = null ) {} diff --git a/PDO/PDO.php b/PDO/PDO.php index bab566d70..34d03f155 100644 --- a/PDO/PDO.php +++ b/PDO/PDO.php @@ -1557,7 +1557,7 @@ public function execute(#[LanguageLevelTypeAware(['8.0' => 'array|null'], defaul */ #[TentativeType] public function fetch( - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_BOTH, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_DEFAULT, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cursorOrientation = PDO::FETCH_ORI_NEXT, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cursorOffset = 0 ): mixed {} @@ -1597,7 +1597,7 @@ public function bindParam( #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $param, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = null, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = 0, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $driverOptions = null ): bool {} @@ -1629,7 +1629,7 @@ public function bindColumn( #[LanguageLevelTypeAware(['8.0' => 'int|string'], default: '')] $column, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &$var, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $type = PDO::PARAM_STR, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = null, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength = 0, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $driverOptions = null ): bool {} @@ -1734,7 +1734,7 @@ public function fetchColumn(#[LanguageLevelTypeAware(['8.0' => 'int'], default: */ #[TentativeType] public function fetchAll( - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_BOTH, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = PDO::FETCH_DEFAULT, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $fetch_argument = null, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args ): array {} diff --git a/Phar/Phar.php b/Phar/Phar.php index 90356506d..84e3c64bf 100644 --- a/Phar/Phar.php +++ b/Phar/Phar.php @@ -137,7 +137,7 @@ public function addFromString( #[TentativeType] public function buildFromDirectory( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern = null + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern = '' ): array {} /** @@ -257,8 +257,8 @@ public function decompress(#[LanguageLevelTypeAware(['8.0' => 'string|null'], de */ #[TentativeType] public function convertToExecutable( - #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = 9021976, - #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = null, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = null, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null ): ?Phar {} @@ -293,8 +293,8 @@ public function convertToExecutable( */ #[TentativeType] public function convertToData( - #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = 9021976, - #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $format = null, + #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = null, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $extension = null ): ?PharData {} @@ -622,7 +622,7 @@ public function setSignatureAlgorithm( */ public function setStub( $stub, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = -1 + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = null ) {} /** @@ -896,9 +896,9 @@ final public static function unlinkArchive(string $filename): bool {} */ final public static function webPhar( ?string $alias = null, - ?string $index = "index.php", + ?string $index = null, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: 'string')] $fileNotFoundScript = null, - array $mimeTypes = null, + array $mimeTypes = [], ?callable $rewrite = null ): void {} @@ -1005,7 +1005,7 @@ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format = Phar::TAR + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format = 0 ) {} /** @@ -1240,7 +1240,7 @@ public function hasMetadata(): bool {} * @return bool TRUE if the file is compressed within the Phar archive, FALSE if not. */ #[TentativeType] - public function isCompressed(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = 9021976): bool {} + public function isCompressed(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $compression = null): bool {} /** * (PHP >= 5.3.0, PECL phar >= 1.0.0)
diff --git a/Reflection/ReflectionClass.php b/Reflection/ReflectionClass.php index 71a8a25a9..29c3d365e 100644 --- a/Reflection/ReflectionClass.php +++ b/Reflection/ReflectionClass.php @@ -278,7 +278,7 @@ public function getReflectionConstant(string $name): ReflectionClassConstant|fal */ #[Pure] #[TentativeType] - public function getReflectionConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {} + public function getReflectionConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = null): array {} /** * Checks if constant is defined @@ -300,7 +300,7 @@ public function hasConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], defaul */ #[Pure] #[TentativeType] - public function getConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {} + public function getConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = null): array {} /** * Gets defined constant diff --git a/SPL/SPL.php b/SPL/SPL.php index 73b351d50..27371a1be 100644 --- a/SPL/SPL.php +++ b/SPL/SPL.php @@ -447,7 +447,7 @@ class IteratorIterator implements OuterIterator * @param Traversable $iterator * @param string|null $class [optional] */ - public function __construct(Traversable $iterator, #[PhpStormStubsElementAvailable(from: '8.0')] ?string $class = '') {} + public function __construct(Traversable $iterator, #[PhpStormStubsElementAvailable(from: '8.0')] ?string $class = null) {} /** * Get the inner iterator @@ -1336,7 +1336,7 @@ class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator public function __construct( RecursiveIterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::MATCH, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = RegexIterator::MATCH, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $pregFlags = 0 ) {} diff --git a/SPL/SPL_c1.php b/SPL/SPL_c1.php index 2498758e1..073f03da8 100644 --- a/SPL/SPL_c1.php +++ b/SPL/SPL_c1.php @@ -59,7 +59,7 @@ public function getExtension(): string {} * @since 5.2.2 */ #[TentativeType] - public function getBasename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $suffix = null): string {} + public function getBasename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $suffix = ''): string {} /** * Gets the path to the file @@ -582,7 +582,7 @@ class GlobIterator extends FilesystemIterator implements Countable */ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO ) {} /** @@ -889,7 +889,7 @@ public function fscanf( #[TentativeType] public function fwrite( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = null + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = 0 ): int|false {} /** @@ -2420,4 +2420,4 @@ public function next(): void {} */ #[TentativeType] public function __debugInfo(): array {} -} +} \ No newline at end of file diff --git a/curl/curl.php b/curl/curl.php index 346f77a6f..2a8665079 100644 --- a/curl/curl.php +++ b/curl/curl.php @@ -27,8 +27,8 @@ class CURLFile */ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, - #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $mime_type = '', - #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $posted_filename = '' + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $mime_type = null, + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $posted_filename = null ) {} /** diff --git a/dom/dom_c.php b/dom/dom_c.php index fbe497b58..6692cca21 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -389,7 +389,7 @@ public function contains(DOMNode|DOMNameSpaceNode|null $other): bool {} /** * @since 8.3 */ - public function getRootNode(?array $options = []): DOMNode {} + public function getRootNode(?array $options = null): DOMNode {} } /** @@ -876,7 +876,7 @@ public function createCDATASection(#[LanguageLevelTypeAware(['8.0' => 'string'], public function createProcessingInstruction( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $target, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.3')] $data, - #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data = null + #[PhpStormStubsElementAvailable(from: '7.4')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data = '' ) {} /** @@ -1061,7 +1061,7 @@ public function renameNode(DOMNode $node, $namespace, $qualifiedName) {} #[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')] public function load( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0 ) {} /** @@ -1095,7 +1095,7 @@ public function save($filename, $options = null) {} #[LanguageLevelTypeAware(['8.3' => 'bool'], default: 'DOMDocument|bool')] public function loadXML( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $source, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0 ) {} /** @@ -1113,7 +1113,7 @@ public function loadXML( #[TentativeType] public function saveXML( ?DOMNode $node = null, - #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0 ): string|false {} /** @@ -1146,7 +1146,7 @@ public function validate(): bool {} * @return int|false the number of XIncludes in the document. */ #[TentativeType] - public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null): int|false {} + public function xinclude(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = 0): int|false {} /** * Load HTML from a string @@ -2015,7 +2015,7 @@ public function replaceChildren(...$nodes): void {} public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $value = null, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace = null + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace = '' ) {} /** @@ -2026,7 +2026,7 @@ public function getAttributeNames(): array {} /** * @since 8.3 */ - public function toggleAttribute(string $qualifiedName, ?bool $force = false): bool {} + public function toggleAttribute(string $qualifiedName, ?bool $force = null): bool {} /** * @since 8.3 @@ -2085,7 +2085,7 @@ public function replaceWholeText($content) {} * @link https://php.net/manual/en/domtext.construct.php * @param string $data [optional] The value of the text node. If not supplied an empty text node is created. */ - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {} + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data = '') {} } /** @@ -2100,7 +2100,7 @@ class DOMComment extends DOMCharacterData * @link https://php.net/manual/en/domcomment.construct.php * @param string $data [optional] The value of the comment */ - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data) {} + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data = '') {} } /** @@ -2351,7 +2351,7 @@ class DOMProcessingInstruction extends DOMNode */ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $value = '' ) {} } diff --git a/fileinfo/fileinfo.php b/fileinfo/fileinfo.php index a13a2d197..c29106777 100644 --- a/fileinfo/fileinfo.php +++ b/fileinfo/fileinfo.php @@ -14,7 +14,7 @@ class finfo * @param string $magic_database [optional] */ public function __construct( - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = 0, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $magic_database ) {} diff --git a/intl/intl.php b/intl/intl.php index 7d72ddec0..5168864b7 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -321,7 +321,7 @@ public function compare( #[TentativeType] public function sort( array &$array, - #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = 0 ): bool {} /** @@ -352,7 +352,7 @@ public function sortWithSortKeys( #[TentativeType] public function asort( array &$array, - #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = null + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Collator::SORT_REGULAR])] $flags = 0 ): bool {} /** @@ -987,7 +987,7 @@ public static function create( #[TentativeType] public function format( #[LanguageAware(['8.0' => 'int|float'], default: '')] $num, - #[LanguageAware(['8.0' => 'int'], default: '')] $type = null + #[LanguageAware(['8.0' => 'int'], default: '')] $type = 0 ): string|false {} /** @@ -1189,7 +1189,7 @@ public function getPattern(): string|false {} #[Pure] #[TentativeType] public function getLocale( - #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = null + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE])] $type = 0 ): string|false {} /** @@ -1911,7 +1911,7 @@ public function __construct( #[ElementAvailable(from: '8.1')] int $timeType = 0, $timezone = null, $calendar = null, - #[LanguageAware(['8.0' => 'string|null'], default: '')] $pattern = '' + #[LanguageAware(['8.0' => 'string|null'], default: '')] $pattern = null ) {} /** @@ -1958,7 +1958,7 @@ public static function create( #[ElementAvailable(from: '8.1')] int $timeType = 0, $timezone = null, #[LanguageAware(['8.0' => 'IntlCalendar|int|null'], default: '')] $calendar = null, - #[LanguageAware(['8.0' => 'string|null'], default: '')] $pattern = '' + #[LanguageAware(['8.0' => 'string|null'], default: '')] $pattern = null ): ?IntlDateFormatter {} /** @@ -2127,7 +2127,7 @@ public function getPattern(): string|false {} public function getLocale( #[ElementAvailable(from: '8.0')] #[LanguageAware(['8.0' => 'int'], default: '')] - $type = null + $type = 0 ): string|false {} /** @@ -2400,7 +2400,7 @@ final private function __construct() {} #[TentativeType] public static function create( #[LanguageAware(['8.0' => 'string'], default: '')] $id, - #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = 0 ): ?Transliterator {} /** @@ -2422,7 +2422,7 @@ public static function create( #[TentativeType] public static function createFromRules( #[LanguageAware(['8.0' => 'string'], default: '')] $rules, - #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = null + #[LanguageAware(['8.0' => 'int'], default: '')] #[EV([Transliterator::FORWARD, Transliterator::REVERSE])] $direction = 0 ): ?Transliterator {} /** @@ -2469,7 +2469,7 @@ public static function listIDs(): array|false {} #[TentativeType] public function transliterate( #[LanguageAware(['8.0' => 'string'], default: '')] $string, - #[LanguageAware(['8.0' => 'int'], default: '')] $start = null, + #[LanguageAware(['8.0' => 'int'], default: '')] $start = 0, #[LanguageAware(['8.0' => 'int'], default: '')] $end = -1 ): string|false {} @@ -3560,7 +3560,7 @@ public static function createTimeZone(#[LanguageAware(['8.0' => 'string'], defau public static function createTimeZoneIDEnumeration( #[LanguageAware(['8.0' => 'int'], default: '')] $type, #[LanguageAware(['8.0' => 'string|null'], default: '')] $region = null, - #[LanguageAware(['8.0' => 'int|null'], default: '')] $rawOffset = 0 + #[LanguageAware(['8.0' => 'int|null'], default: '')] $rawOffset = null ): IntlIterator|false {} /** @@ -7742,7 +7742,7 @@ public static function transcode( #[LanguageAware(['8.0' => 'string'], default: '')] $str, #[LanguageAware(['8.0' => 'string'], default: '')] $toEncoding, #[LanguageAware(['8.0' => 'string'], default: '')] $fromEncoding, - ?array $options = [] + ?array $options = null ): string|false {} } // End of intl v.1.1.0 diff --git a/mysqli/mysqli.php b/mysqli/mysqli.php index 21709609e..2186ab4dd 100644 --- a/mysqli/mysqli.php +++ b/mysqli/mysqli.php @@ -683,7 +683,7 @@ public function real_connect( ?string $database = null, ?int $port = null, ?string $socket = null, - int $flags = null + int $flags = 0 ): bool {} /** @@ -1291,7 +1291,7 @@ public function fetch_assoc(): array|false|null {} * are no more rows in the result set, or false on failure. */ #[TentativeType] - public function fetch_object(string $class = 'stdClass', array $constructor_args = null): object|false|null {} + public function fetch_object(string $class = 'stdClass', array $constructor_args = []): object|false|null {} /** * Fetch the next row of a result set as an enumerated array diff --git a/soap/soap.php b/soap/soap.php index 49550e00d..0d36f88c5 100644 --- a/soap/soap.php +++ b/soap/soap.php @@ -267,7 +267,7 @@ public function SoapClient($wsdl, array $options = null) {} */ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $wsdl, - array $options = null + array $options = [] ) {} /** @@ -462,7 +462,7 @@ public function __setCookie( * @since 5.0.1 */ #[TentativeType] - public function __setLocation(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $location = ''): ?string {} + public function __setLocation(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $location = null): ?string {} /** * Sets SOAP headers for subsequent calls @@ -551,9 +551,9 @@ public function __construct( #[LanguageLevelTypeAware(["8.0" => 'mixed'], default: '')] $data, #[LanguageLevelTypeAware(["7.1" => "int|null"], default: "int")] $encoding, #[LanguageLevelTypeAware(["8.0" => "string|null"], default: "string")] $typeName, - #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $typeNamespace = '', - #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $nodeName = '', - #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $nodeNamespace = '' + #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $typeNamespace = null, + #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $nodeName = null, + #[LanguageLevelTypeAware(["8.0" => 'string|null'], default: '')] $nodeNamespace = null ) {} /** @@ -631,7 +631,7 @@ class SoapServer */ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $wsdl, - array $options = null + array $options = [] ) {} /** @@ -799,9 +799,9 @@ public function handle(#[LanguageLevelTypeAware(['8.0' => 'string|null'], defaul public function fault( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $code, #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $string, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $actor = null, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $actor = '', #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $details = null, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name = null + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name = '' ): void {} /** diff --git a/sqlite3/sqlite3.php b/sqlite3/sqlite3.php index f4d942d61..ebcacd143 100644 --- a/sqlite3/sqlite3.php +++ b/sqlite3/sqlite3.php @@ -81,7 +81,7 @@ public function open( #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $flags, #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $encryptionKey, #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE, - #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = '' ): void {} /** @@ -370,7 +370,7 @@ public function __construct( #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $flags, #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $encryptionKey, #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE, - #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = '' ) {} /** diff --git a/tests/AbstractBaseStubsTestCase.php b/tests/AbstractBaseStubsTestCase.php index 6c4483b52..65602af0c 100644 --- a/tests/AbstractBaseStubsTestCase.php +++ b/tests/AbstractBaseStubsTestCase.php @@ -68,6 +68,17 @@ public static function getStringRepresentationOfDefaultParameterValue(mixed $def /** @var PHPConst $rightConstant */ $rightConstant = array_pop($constants); $value = $leftConstant->value|$rightConstant->value; + } elseif ($defaultValue->left instanceof ClassConstFetch && $defaultValue->right instanceof ClassConstFetch){ + $leftClass = $defaultValue->left->class->toString(); + $rightClass = $defaultValue->right->class->toString(); + $leftClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($leftClass); + $rightClass = PhpStormStubsSingleton::getPhpStormStubs()->getClass($rightClass); + if ($leftClass === null || $rightClass === null) { + throw new Exception("Class $leftClass->name or $rightClass->name not found in stubs"); + } + $leftConstant = $leftClass->getConstant((string)$defaultValue->left->name);; + $rightConstant = $rightClass->getConstant((string)$defaultValue->right->name);; + $value = $leftConstant->value|$rightConstant->value; } } elseif ($defaultValue instanceof UnaryMinus && property_exists($defaultValue->expr, 'value')) { $value = '-' . $defaultValue->expr->value; diff --git a/tests/Model/BasePHPClass.php b/tests/Model/BasePHPClass.php index 300ec83c3..63c30aceb 100644 --- a/tests/Model/BasePHPClass.php +++ b/tests/Model/BasePHPClass.php @@ -59,6 +59,7 @@ function (PHPConst $nextConstant) use ($parsedConstant) { */ public function getConstant($constantName) { + $arra = $this->constants; $constants = array_filter($this->constants, function (PHPConst $constant) use ($constantName) { return $constant->name === $constantName && $constant->duplicateOtherElement === false && BasePHPElement::entitySuitsCurrentPhpVersion($constant); diff --git a/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php b/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php index 751563825..e74e07eec 100644 --- a/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php +++ b/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php @@ -129,7 +129,7 @@ public static function methodOptionalParametersWithDefaultValueProvider(): ?Gene foreach (EntitiesFilter::getFilteredFunctions($class) as $method) { foreach (EntitiesFilter::getFilteredParameters( $method, - fn (PHPParameter $parameter) => !$parameter->isOptional || empty($parameter->defaultValue), + fn (PHPParameter $parameter) => !$parameter->isOptional, StubProblemType::WRONG_PARAMETER_DEFAULT_VALUE ) as $parameter) { yield "$class->name::$method->name($parameter->name)" => [$class, $method, $parameter]; From ade19d250a84caec62377217aba4631d72f07523 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Mon, 4 Sep 2023 14:58:58 +0200 Subject: [PATCH 51/73] [phpstorm-stubs] Reverted things that shouldn't have been changed. --- SPL/SPL_c1.php | 4 ++-- tests/Model/BasePHPClass.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/SPL/SPL_c1.php b/SPL/SPL_c1.php index 073f03da8..402779ade 100644 --- a/SPL/SPL_c1.php +++ b/SPL/SPL_c1.php @@ -582,7 +582,7 @@ class GlobIterator extends FilesystemIterator implements Countable */ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO ) {} /** @@ -2420,4 +2420,4 @@ public function next(): void {} */ #[TentativeType] public function __debugInfo(): array {} -} \ No newline at end of file +} diff --git a/tests/Model/BasePHPClass.php b/tests/Model/BasePHPClass.php index 63c30aceb..300ec83c3 100644 --- a/tests/Model/BasePHPClass.php +++ b/tests/Model/BasePHPClass.php @@ -59,7 +59,6 @@ function (PHPConst $nextConstant) use ($parsedConstant) { */ public function getConstant($constantName) { - $arra = $this->constants; $constants = array_filter($this->constants, function (PHPConst $constant) use ($constantName) { return $constant->name === $constantName && $constant->duplicateOtherElement === false && BasePHPElement::entitySuitsCurrentPhpVersion($constant); From da20e393ee381ef3ce3f8e1a8e48c6d2f8e1fd58 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Tue, 5 Sep 2023 12:12:02 +0200 Subject: [PATCH 52/73] [phpstorm-stubs] removed most of the muted problems with description 'wrong default value'. Fixed tests that started to fail after this. --- Phar/Phar.php | 4 +- SPL/SPL.php | 4 +- date/date_c.php | 4 +- tests/AbstractBaseStubsTestCase.php | 4 +- tests/TestData/mutedProblems.json | 245 ---------------------------- 5 files changed, 8 insertions(+), 253 deletions(-) diff --git a/Phar/Phar.php b/Phar/Phar.php index 84e3c64bf..56795c9df 100644 --- a/Phar/Phar.php +++ b/Phar/Phar.php @@ -57,7 +57,7 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek */ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null, #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $fileformat = null ) {} @@ -1003,7 +1003,7 @@ class PharData extends Phar */ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $format = 0 ) {} diff --git a/SPL/SPL.php b/SPL/SPL.php index 27371a1be..abc3a6619 100644 --- a/SPL/SPL.php +++ b/SPL/SPL.php @@ -935,7 +935,7 @@ class RecursiveCachingIterator extends CachingIterator implements RecursiveItera * @param Iterator $iterator The iterator to cache. * @param int $flags [optional] A bitmask of flags. See CachingIterator class constants for details. */ - public function __construct(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::CALL_TOSTRING) {} + public function __construct(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = CachingIterator::CALL_TOSTRING) {} /** * Check whether the current element of the inner iterator has children @@ -1385,7 +1385,7 @@ public function __construct( $iterator, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = self::BYPASS_KEY, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = self::SELF_FIRST + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode = RecursiveIteratorIterator::SELF_FIRST ) {} /** diff --git a/date/date_c.php b/date/date_c.php index c297e6ca0..9e2bd89bb 100644 --- a/date/date_c.php +++ b/date/date_c.php @@ -809,8 +809,8 @@ public function getOffset(DateTimeInterface $datetime): int {} public function getTransitions( #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $timestampBegin, #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $timestampEnd, - #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampBegin = null, - #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampEnd = null + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampBegin = PHP_INT_MIN, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestampEnd = PHP_INT_MAX ): array|false {} /** diff --git a/tests/AbstractBaseStubsTestCase.php b/tests/AbstractBaseStubsTestCase.php index 65602af0c..24463da2e 100644 --- a/tests/AbstractBaseStubsTestCase.php +++ b/tests/AbstractBaseStubsTestCase.php @@ -76,8 +76,8 @@ public static function getStringRepresentationOfDefaultParameterValue(mixed $def if ($leftClass === null || $rightClass === null) { throw new Exception("Class $leftClass->name or $rightClass->name not found in stubs"); } - $leftConstant = $leftClass->getConstant((string)$defaultValue->left->name);; - $rightConstant = $rightClass->getConstant((string)$defaultValue->right->name);; + $leftConstant = $leftClass->getConstant((string)$defaultValue->left->name); + $rightConstant = $rightClass->getConstant((string)$defaultValue->right->name); $value = $leftConstant->value|$rightConstant->value; } } elseif ($defaultValue instanceof UnaryMinus && property_exists($defaultValue->expr, 'value')) { diff --git a/tests/TestData/mutedProblems.json b/tests/TestData/mutedProblems.json index 31b8f6385..e39bc1607 100644 --- a/tests/TestData/mutedProblems.json +++ b/tests/TestData/mutedProblems.json @@ -799,129 +799,6 @@ } ] }, - { - "name": "timezone_transitions_get", - "parameters": [ - { - "name": "timestampBegin", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - }, - { - "name": "timestampEnd", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - }, - { - "name": "mb_encode_mimeheader", - "parameters": [ - { - "name": "newline", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - }, - { - "name": "trim", - "parameters": [ - { - "name": "characters", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - }, - { - "name": "rtrim", - "parameters": [ - { - "name": "characters", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - }, - { - "name": "chop", - "parameters": [ - { - "name": "characters", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - }, - { - "name": "ltrim", - "parameters": [ - { - "name": "characters", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - }, - { - "name": "explode", - "parameters": [ - { - "name": "limit", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - }, { "name": "bcdiv", "problems": [ @@ -1821,44 +1698,12 @@ ] } ] - }, - { - "name": "__construct", - "parameters": [ - { - "name": "flags", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] } ] }, { "name": "PharData", "methods": [ - { - "name": "__construct", - "parameters": [ - { - "name": "flags", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - }, { "name": "__destruct", "problems": [ @@ -2722,75 +2567,6 @@ ] } ] - }, - { - "name": "getTransitions", - "parameters": [ - { - "name": "timestampBegin", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - }, - { - "name": "timestampEnd", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - } - ] - }, - { - "name": "RecursiveCachingIterator", - "methods": [ - { - "name": "__construct", - "parameters": [ - { - "name": "flags", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - } - ] - }, - { - "name": "RecursiveTreeIterator", - "methods": [ - { - "name": "__construct", - "parameters": [ - { - "name": "mode", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] } ] }, @@ -2815,27 +2591,6 @@ } ] }, - { - "name": "MultipleIterator", - "methods": [ - { - "name": "__construct", - "parameters": [ - { - "name": "flags", - "problems": [ - { - "description": "wrong default value", - "versions": [ - "ALL" - ] - } - ] - } - ] - } - ] - }, { "name": "DateInterval", "methods": [ From fb1e679110f7b4d2639600ec9eb8d8383876c56b Mon Sep 17 00:00:00 2001 From: LolGleb Date: Tue, 5 Sep 2023 12:40:52 +0200 Subject: [PATCH 53/73] [phpstorm-stubs] fixed stubs default values for testFunctionsDefaultParametersValue. --- date/date.php | 2 +- mbstring/mbstring.php | 2 +- standard/standard_1.php | 8 ++++---- standard/standard_2.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/date/date.php b/date/date.php index 7e328bacf..b72ce4452 100644 --- a/date/date.php +++ b/date/date.php @@ -1346,7 +1346,7 @@ function timezone_offset_get(DateTimeZone $object, DateTimeInterface $datetime) * @return array|false

Returns numerically indexed array containing associative array with all transitions on success or FALSE on failure.

*/ #[Pure(true)] -function timezone_transitions_get(DateTimeZone $object, int $timestampBegin, int $timestampEnd): array|false {} +function timezone_transitions_get(DateTimeZone $object, int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX): array|false {} /** * Alias: diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php index fb4be1ec1..7f950634b 100644 --- a/mbstring/mbstring.php +++ b/mbstring/mbstring.php @@ -779,7 +779,7 @@ function mb_convert_kana(string $string, string $mode = 'KV', ?string $encoding) * @return string A converted version of the string represented in ASCII. */ #[Pure] -function mb_encode_mimeheader(string $string, ?string $charset, ?string $transfer_encoding, string $newline = "\n", int $indent = 0): string {} +function mb_encode_mimeheader(string $string, ?string $charset, ?string $transfer_encoding, string $newline = "\r\n", int $indent = 0): string {} /** * Decode string in MIME header field diff --git a/standard/standard_1.php b/standard/standard_1.php index a657dbc46..ecbd15361 100644 --- a/standard/standard_1.php +++ b/standard/standard_1.php @@ -767,7 +767,7 @@ function addcslashes(string $string, string $characters): string {} * @return string the modified string. */ #[Pure] -function rtrim(string $string, string $characters = " \t\n\r\0\x0B"): string {} +function rtrim(string $string, string $characters = " \n\r\t\v\0"): string {} /** * Replace all occurrences of the search string with the replacement string @@ -894,7 +894,7 @@ function chunk_split(string $string, int $length = 76, string $separator = "\r\n * @return string The trimmed string. */ #[Pure] -function trim(string $string, string $characters = " \t\n\r\0\x0B"): string {} +function trim(string $string, string $characters = " \n\r\t\v\0"): string {} /** * Strip whitespace (or other characters) from the beginning of a string @@ -926,7 +926,7 @@ function trim(string $string, string $characters = " \t\n\r\0\x0B"): string {} * (0x0B)), a vertical tab. */ #[Pure] -function ltrim(string $string, string $characters = " \t\n\r\0\x0B"): string {} +function ltrim(string $string, string $characters = " \n\r\t\v\0"): string {} /** * Strip HTML and PHP tags from a string @@ -996,7 +996,7 @@ function similar_text(string $string1, string $string2, &$percent): int {} */ #[Pure] #[LanguageLevelTypeAware(["8.0" => "string[]"], default: "string[]|false")] -function explode(string $separator, string $string, int $limit) {} +function explode(string $separator, string $string, int $limit = PHP_INT_MAX) {} /** * Join array elements with a string diff --git a/standard/standard_2.php b/standard/standard_2.php index 82494741f..8b5188b88 100644 --- a/standard/standard_2.php +++ b/standard/standard_2.php @@ -295,7 +295,7 @@ function str_pad(string $string, int $length, string $pad_string = " ", int $pad * @see rtrim() */ #[Pure] -function chop(string $string, string $characters): string {} +function chop(string $string, string $characters = " \n\r\t\v\0"): string {} /** * Alias: From a0c77afb46503f22d631b57761c14f481be0d9aa Mon Sep 17 00:00:00 2001 From: LolGleb Date: Wed, 13 Sep 2023 15:23:56 +0200 Subject: [PATCH 54/73] [phpstorm-stubs] added new tests for parameters without default value. --- Phar/Phar.php | 2 +- Reflection/ReflectionClass.php | 4 +- Reflection/ReflectionProperty.php | 4 +- intl/intl.php | 16 ++-- pgsql/pgsql.php | 82 +++++++++---------- random/random.php | 8 +- soap/soap.php | 2 +- tests/Model/PHPFunction.php | 1 + tests/Model/PHPMethod.php | 1 + tests/Model/PHPParameter.php | 3 + .../StubsConstantsAndParametersValuesTest.php | 62 ++++++++++++++ .../ReflectionParametersProvider.php | 35 +++++++- 12 files changed, 160 insertions(+), 60 deletions(-) diff --git a/Phar/Phar.php b/Phar/Phar.php index 56795c9df..2e6eb1747 100644 --- a/Phar/Phar.php +++ b/Phar/Phar.php @@ -622,7 +622,7 @@ public function setSignatureAlgorithm( */ public function setStub( $stub, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = null + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length ) {} /** diff --git a/Reflection/ReflectionClass.php b/Reflection/ReflectionClass.php index 29c3d365e..78677a763 100644 --- a/Reflection/ReflectionClass.php +++ b/Reflection/ReflectionClass.php @@ -533,7 +533,7 @@ public function getStaticProperties() {} * * @link https://php.net/manual/en/reflectionclass.getstaticpropertyvalue.php * @param string $name The name of the static property for which to return a value. - * @param mixed $default A default value to return in case the class does + * @param mixed $default [optional] A default value to return in case the class does * not declare a static property with the given name. If the property does * not exist and this argument is omitted, a {@see ReflectionException} is thrown. * @return mixed The value of the static property. @@ -542,7 +542,7 @@ public function getStaticProperties() {} #[TentativeType] public function getStaticPropertyValue( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $default = null + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $default ): mixed {} /** diff --git a/Reflection/ReflectionProperty.php b/Reflection/ReflectionProperty.php index f770f1f5d..642d4d9b3 100644 --- a/Reflection/ReflectionProperty.php +++ b/Reflection/ReflectionProperty.php @@ -130,13 +130,13 @@ public function getValue(#[LanguageLevelTypeAware(['8.0' => 'object|null'], defa * @param mixed $objectOrValue If the property is non-static an object must * be provided to change the property on. If the property is static this * parameter is left out and only $value needs to be provided. - * @param mixed $value The new value. + * @param mixed $value [optional] The new value. * @return void No value is returned. */ #[TentativeType] public function setValue( #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $objectOrValue, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value = null + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value ): void {} /** diff --git a/intl/intl.php b/intl/intl.php index 5168864b7..a328d1c5c 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -5563,7 +5563,7 @@ function intlcal_before(IntlCalendar $calendar, IntlCalendar $other): bool {} * @since 5.5 */ #[LanguageAware(['8.3' => 'true'], default: 'bool')] -function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = null, int $hour = null, int $minute = null, int $second = null) {} +function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth, int $hour, int $minute, int $second) {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
@@ -6448,17 +6448,17 @@ function intltz_use_daylight_time(IntlTimeZone $timezone): bool {} /** * (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
- * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear - * @param string|null $localeOrMonth - * @param int $day - * @param int $hour - * @param int $minute - * @param int $second + * @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear [optional] + * @param string|null $localeOrMonth [optional] + * @param int $day [optional] + * @param int $hour [optional] + * @param int $minute [optional] + * @param int $second [optional] * @return IntlGregorianCalendar|null * @since 5.5 */ #[Pure] -function intlgregcal_create_instance($timezoneOrYear = null, $localeOrMonth = null, $day = null, $hour = null, $minute = null, $second = null): ?IntlGregorianCalendar {} +function intlgregcal_create_instance($timezoneOrYear, $localeOrMonth, $day, $hour, $minute, $second): ?IntlGregorianCalendar {} /** * @param IntlGregorianCalendar $calendar diff --git a/pgsql/pgsql.php b/pgsql/pgsql.php index 9b2411bc4..0d0764541 100644 --- a/pgsql/pgsql.php +++ b/pgsql/pgsql.php @@ -267,7 +267,7 @@ function pg_ping(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], de * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param string $name

+ * @param string $name [optional]

* Possible param_name values include server_version, * server_encoding, client_encoding, * is_superuser, session_authorization, @@ -277,7 +277,7 @@ function pg_ping(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], de * @return string|false A string containing the value of the parameter, FALSE on failure or invalid * param_name. */ -function pg_parameter_status(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, string $name = null): string|false {} +function pg_parameter_status(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, string $name): string|false {} /** * Returns the current in-transaction status of the server. @@ -304,7 +304,7 @@ function pg_transaction_status(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connect * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param string $query

+ * @param string $query [optional]

* The SQL statement or statements to be executed. When multiple statements are passed to the function, * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands * included in the query string. However, using multiple transactions in one function call is not recommended. @@ -327,7 +327,7 @@ function pg_transaction_status(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connect function pg_query( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - string $query = null + string $query ) {} /** @@ -352,7 +352,7 @@ function pg_query( * If for some reason you cannot use a parameter, ensure that interpolated * values are properly escaped. *

- * @param array $params

+ * @param array $params [optional]

* An array of parameter values to substitute for the $1, $2, etc. placeholders * in the original prepared query string. The number of elements in the array * must match the number of placeholders. @@ -370,7 +370,7 @@ function pg_query_params( #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $query = '', #[PhpStormStubsElementAvailable(from: '8.0')] $query, - array $params = null + array $params ) {} /** @@ -388,7 +388,7 @@ function pg_query_params( * "" is specified, then an unnamed statement is created, overwriting any * previously defined unnamed statement. *

- * @param string $query

+ * @param string $query [optional]

* The parameterized SQL statement. Must contain only a single statement. * (multiple statements separated by semi-colons are not allowed.) If any parameters * are used, they are referred to as $1, $2, etc. @@ -401,7 +401,7 @@ function pg_prepare( #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $statement_name = '', #[PhpStormStubsElementAvailable(from: '8.0')] string $statement_name, - string $query = null + string $query ) {} /** @@ -420,7 +420,7 @@ function pg_prepare( * pg_send_prepare or a PREPARE SQL * command. *

- * @param array $params

+ * @param array $params [optional]

* An array of parameter values to substitute for the $1, $2, etc. placeholders * in the original prepared query string. The number of elements in the array * must match the number of placeholders. @@ -436,7 +436,7 @@ function pg_execute( #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] string $statement_name = '', #[PhpStormStubsElementAvailable(from: '8.0')] $statement_name, - array $params = null + array $params ) {} /** @@ -566,7 +566,7 @@ function pg_cancel_query(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], * Row number in result to fetch. Rows are numbered from 0 upwards. If omitted, * next row is fetched. *

- * @param mixed $field

+ * @param mixed $field [optional]

* A string representing the name of the field (column) to fetch, otherwise * an int representing the field number to fetch. Fields are * numbered from 0 upwards. @@ -585,7 +585,7 @@ function pg_fetch_result( #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $row = 0, #[PhpStormStubsElementAvailable(from: '8.0')] $row, - string|int $field = null + string|int $field ): string|false|null {} /** @@ -951,14 +951,14 @@ function pg_field_type_oid(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], d * (among others). *

* @param int $row - * @param mixed $field + * @param mixed $field [optional] * @return int|false The field printed length, or FALSE on error. */ function pg_field_prtlen( #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $row = 0, #[PhpStormStubsElementAvailable(from: '8.0')] $row, - string|int $field = null + string|int $field ): int|false {} /** @@ -973,7 +973,7 @@ function pg_field_prtlen( * Row number in result to fetch. Rows are numbered from 0 upwards. If omitted, * current row is fetched. *

- * @param mixed $field

+ * @param mixed $field [optional]

* Field number (starting from 0) as an integer or * the field name as a string. *

@@ -984,7 +984,7 @@ function pg_field_is_null( #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $row = 0, #[PhpStormStubsElementAvailable(from: '8.0')] $row, - string|int $field = null + string|int $field ): int|false {} /** @@ -1129,7 +1129,7 @@ function pg_last_notice(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param string $query

+ * @param string $query [optional]

* A line of text to be sent directly to the PostgreSQL backend. A NULL * terminator is added automatically. *

@@ -1138,7 +1138,7 @@ function pg_last_notice(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], function pg_put_line( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - string $query = null + string $query ): bool {} /** @@ -1271,7 +1271,7 @@ function pg_untrace(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], *

* @return string|int|false A large object OID or FALSE on error. */ -function pg_lo_create(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection = null, $oid = null): string|int|false {} +function pg_lo_create(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, $oid): string|int|false {} /** * Delete a large object @@ -1282,7 +1282,7 @@ function pg_lo_create(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], de * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param int $oid

+ * @param int $oid [optional]

* The OID of the large object in the database. *

* @return bool TRUE on success or FALSE on failure. @@ -1290,7 +1290,7 @@ function pg_lo_create(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], de function pg_lo_unlink( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - $oid = null + $oid ): bool {} /** @@ -1302,10 +1302,10 @@ function pg_lo_unlink( * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param int $oid

+ * @param int $oid [optional]

* The OID of the large object in the database. *

- * @param string $mode

+ * @param string $mode [optional]

* Can be either "r" for read-only, "w" for write only or "rw" for read and * write. *

@@ -1315,8 +1315,8 @@ function pg_lo_unlink( function pg_lo_open( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - $oid = null, - string $mode = null + $oid, + string $mode ) {} /** @@ -1479,7 +1479,7 @@ function pg_lo_truncate( * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param string $string

+ * @param string $string [optional]

* A string containing text to be escaped. *

* @return string A string containing the escaped data. @@ -1487,7 +1487,7 @@ function pg_lo_truncate( function pg_escape_string( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - string $string = null + string $string ): string {} /** @@ -1499,7 +1499,7 @@ function pg_escape_string( * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param string $string

+ * @param string $string [optional]

* A string containing text or binary data to be inserted into a bytea * column. *

@@ -1508,7 +1508,7 @@ function pg_escape_string( function pg_escape_bytea( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - string $string = null + string $string ): string {} /** @@ -1520,7 +1520,7 @@ function pg_escape_bytea( * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param string $string

+ * @param string $string [optional]

* A string containing text to be escaped. *

* @return string|false A string containing the escaped data. @@ -1529,7 +1529,7 @@ function pg_escape_bytea( function pg_escape_identifier( #[PhpStormStubsElementAvailable(from: '5.4', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - string $string = null + string $string ): string|false {} /** @@ -1541,7 +1541,7 @@ function pg_escape_identifier( * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param string $string

+ * @param string $string [optional]

* A string containing text to be escaped. *

* @return string|false A string containing the escaped data. @@ -1550,7 +1550,7 @@ function pg_escape_identifier( function pg_escape_literal( #[PhpStormStubsElementAvailable(from: '5.4', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - string $string = null + string $string ): string|false {} /** @@ -1574,7 +1574,7 @@ function pg_unescape_bytea(string $string): string {} * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param int $verbosity

+ * @param int $verbosity [optional]

* The required verbosity: PGSQL_ERRORS_TERSE, * PGSQL_ERRORS_DEFAULT * or PGSQL_ERRORS_VERBOSE. @@ -1586,7 +1586,7 @@ function pg_unescape_bytea(string $string): string {} function pg_set_error_verbosity( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - int $verbosity = null + int $verbosity ): int|false {} /** @@ -1611,7 +1611,7 @@ function pg_client_encoding(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. *

- * @param string $encoding

+ * @param string $encoding [optional]

* The required client encoding. One of SQL_ASCII, EUC_JP, * EUC_CN, EUC_KR, EUC_TW, * UNICODE, MULE_INTERNAL, LATINX (X=1...9), @@ -1627,7 +1627,7 @@ function pg_client_encoding(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection function pg_set_client_encoding( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - string $encoding = null + string $encoding ): int {} /** @@ -1817,14 +1817,14 @@ function pg_select( /** * @param $connection - * @param $query + * @param $query [optional] * @return mixed */ #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result|false'], default: 'resource|false')] function pg_exec( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection, - string $query = null + string $query ) {} /** @@ -1932,14 +1932,14 @@ function pg_freeresult(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], defau /** * @param PgSql\Result|resource $result * @param $row - * @param $field + * @param $field [optional] * @deprecated */ function pg_result( #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection, #[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], default: 'resource')] $result, #[PhpStormStubsElementAvailable(from: '8.0')] $row, - #[PhpStormStubsElementAvailable(from: '8.0')] string|int $field = null + #[PhpStormStubsElementAvailable(from: '8.0')] string|int $field ): string|null|false {} /** diff --git a/random/random.php b/random/random.php index becbf9c37..352edc28d 100644 --- a/random/random.php +++ b/random/random.php @@ -50,17 +50,17 @@ function srand( /** * Generate a random integer * @link https://php.net/manual/en/function.rand.php - * @param int $min + * @param int $min [optional] * @param int $max [optional] * @return int A pseudo random value between min * (or 0) and max (or getrandmax, inclusive). */ - function rand(int $min = null, int $max): int {} + function rand(int $min, int $max): int {} /** * Generate a random value via the Mersenne Twister Random Number Generator * @link https://php.net/manual/en/function.mt-rand.php - * @param int $min

+ * @param int $min [optional]

* Optional lowest value to be returned (default: 0) *

* @param int $max [optional]

@@ -69,7 +69,7 @@ function rand(int $min = null, int $max): int {} * @return int A random integer value between min (or 0) * and max (or mt_getrandmax, inclusive) */ - function mt_rand(int $min = null, int $max): int {} + function mt_rand(int $min, int $max): int {} /** * Show largest possible random value diff --git a/soap/soap.php b/soap/soap.php index 0d36f88c5..c25efc398 100644 --- a/soap/soap.php +++ b/soap/soap.php @@ -1054,7 +1054,7 @@ class SoapHeader public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $namespace, #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data = null, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $data, #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $mustUnderstand = false, #[LanguageLevelTypeAware(['8.0' => 'string|int|null'], default: '')] $actor = null ) {} diff --git a/tests/Model/PHPFunction.php b/tests/Model/PHPFunction.php index 5a8219e28..98ac6b679 100644 --- a/tests/Model/PHPFunction.php +++ b/tests/Model/PHPFunction.php @@ -103,6 +103,7 @@ public function readObjectFromStubNode($node) $relatedParamTag = array_pop($relatedParamTags); if ($relatedParamTag !== null) { $parameter->isOptional = $parameter->isOptional || str_contains((string)$relatedParamTag->getDescription(), '[optional]'); + $parameter->markedOptionalInPhpDoc = str_contains((string)$relatedParamTag->getDescription(), '[optional]'); } } diff --git a/tests/Model/PHPMethod.php b/tests/Model/PHPMethod.php index 4526da3a2..da0271664 100644 --- a/tests/Model/PHPMethod.php +++ b/tests/Model/PHPMethod.php @@ -119,6 +119,7 @@ public function readObjectFromStubNode($node) $relatedParamTag = array_pop($relatedParamTags); if ($relatedParamTag !== null) { $parameter->isOptional = $parameter->isOptional || str_contains((string)$relatedParamTag->getDescription(), '[optional]'); + $parameter->markedOptionalInPhpDoc = str_contains((string)$relatedParamTag->getDescription(), '[optional]'); } } diff --git a/tests/Model/PHPParameter.php b/tests/Model/PHPParameter.php index c335996a7..a44585576 100644 --- a/tests/Model/PHPParameter.php +++ b/tests/Model/PHPParameter.php @@ -23,6 +23,8 @@ class PHPParameter extends BasePHPElement public $is_vararg = false; public $is_passed_by_ref = false; public $isOptional = false; + public $isDefaultValueAvailable = false; + public $markedOptionalInPhpDoc = false; public $defaultValue; /** @@ -39,6 +41,7 @@ public function readObjectFromReflection($reflectionObject) $this->is_passed_by_ref = $reflectionObject->isPassedByReference() && !$reflectionObject->canBePassedByValue(); $this->isOptional = $reflectionObject->isOptional(); $this->indexInSignature = $reflectionObject->getPosition(); + $this->isDefaultValueAvailable = $reflectionObject->isDefaultValueAvailable(); if ($reflectionObject->isDefaultValueAvailable()) { $this->defaultValue = $reflectionObject->getDefaultValue(); if (in_array('bool', $this->typesFromSignature, true)) { diff --git a/tests/StubsConstantsAndParametersValuesTest.php b/tests/StubsConstantsAndParametersValuesTest.php index cc2c58135..43359ce32 100644 --- a/tests/StubsConstantsAndParametersValuesTest.php +++ b/tests/StubsConstantsAndParametersValuesTest.php @@ -57,6 +57,33 @@ public function testFunctionsDefaultParametersValue(PHPFunction $function, PHPPa ); } + /** + * @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionParametersProvider::functionOptionalParametersWithoutDefaultValueProvider + * @throws Exception|RuntimeException + */ + public function testFunctionsWithoutOptionalDefaultParametersValue(PHPFunction $function, PHPParameter $parameter) + { + $phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getFunction($function->name); + $stubParameters = array_filter($phpstormFunction->parameters, fn (PHPParameter $stubParameter) => $stubParameter->indexInSignature === $parameter->indexInSignature); + /** @var PHPParameter $stubOptionalParameter */ + $stubOptionalParameter = array_pop($stubParameters); + + self::assertTrue(empty($stubOptionalParameter->defaultValue), + sprintf( + 'Stub function "%s" has a parameter "%s" which expected to have no default value but it has', + $function->name, + $stubOptionalParameter->name + ) + ); + self::assertTrue($stubOptionalParameter->markedOptionalInPhpDoc, + sprintf( + 'Stub function "%s" has a parameter "%s" which expected to be marked as [optional] at PHPDoc but it is not', + $function->name, + $stubOptionalParameter->name + ) + ); + } + /** * @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionParametersProvider::methodOptionalParametersWithDefaultValueProvider * @throws Exception|RuntimeException @@ -88,4 +115,39 @@ public function testMethodsDefaultParametersValue(PHPClass|PHPInterface $class, ) ); } + + /** + * @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionParametersProvider::methodOptionalParametersWithoutDefaultValueProvider + * @throws Exception|RuntimeException + */ + public function testMethodsWithoutOptionalDefaultParametersValue(PHPClass|PHPInterface $class, PHPMethod $method, PHPParameter $parameter) + { + if ($class instanceof PHPEnum) { + $phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getEnum($class->name)->getMethod($method->name); + } elseif ($class instanceof PHPClass) { + $phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getClass($class->name)->getMethod($method->name); + } else { + $phpstormFunction = PhpStormStubsSingleton::getPhpStormStubs()->getInterface($class->name)->getMethod($method->name); + } + $stubParameters = array_filter($phpstormFunction->parameters, fn (PHPParameter $stubParameter) => $stubParameter->indexInSignature === $parameter->indexInSignature); + /** @var PHPParameter $stubOptionalParameter */ + $stubOptionalParameter = array_pop($stubParameters); + + self::assertTrue(empty($stubOptionalParameter->defaultValue), + sprintf( + 'Stub method %s::%s has a parameter "%s" which expected to have no default value but it has', + $class->name, + $method->name, + $stubOptionalParameter->name + ) + ); + self::assertTrue($stubOptionalParameter->markedOptionalInPhpDoc, + sprintf( + 'Stub method %s::%s has a parameter "%s" which expected to be marked as [optional] at PHPDoc but it is not', + $class->name, + $method->name, + $stubOptionalParameter->name + ) + ); + } } diff --git a/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php b/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php index e74e07eec..d5bea6f2b 100644 --- a/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php +++ b/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php @@ -63,6 +63,19 @@ public static function functionOptionalParametersWithDefaultValueProvider(): ?Ge } } + public static function functionOptionalParametersWithoutDefaultValueProvider(): ?Generator + { + foreach (EntitiesFilter::getFilteredFunctions() as $function) { + foreach (EntitiesFilter::getFilteredParameters( + $function, + fn (PHPParameter $parameter) => !$parameter->isOptional || $parameter->isDefaultValueAvailable || $parameter->is_vararg, + StubProblemType::WRONG_PARAMETER_DEFAULT_VALUE + ) as $parameter) { + yield "$function->name($parameter->name)" => [$function, $parameter]; + } + } + } + public static function methodParametersProvider(): ?Generator { $classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() + @@ -129,7 +142,27 @@ public static function methodOptionalParametersWithDefaultValueProvider(): ?Gene foreach (EntitiesFilter::getFilteredFunctions($class) as $method) { foreach (EntitiesFilter::getFilteredParameters( $method, - fn (PHPParameter $parameter) => !$parameter->isOptional, + fn (PHPParameter $parameter) => !$parameter->isOptional || !$parameter->isDefaultValueAvailable, + StubProblemType::WRONG_PARAMETER_DEFAULT_VALUE + ) as $parameter) { + yield "$class->name::$method->name($parameter->name)" => [$class, $method, $parameter]; + } + } + } + } + } + + public static function methodOptionalParametersWithoutDefaultValueProvider(): ?Generator + { + $classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() + + ReflectionStubsSingleton::getReflectionStubs()->getInterfaces(); + foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) { + //exclude classes from PHPReflectionParser + if (strncmp($class->name, 'PHP', 3) !== 0) { + foreach (EntitiesFilter::getFilteredFunctions($class) as $method) { + foreach (EntitiesFilter::getFilteredParameters( + $method, + fn (PHPParameter $parameter) => !$parameter->isOptional || $parameter->isDefaultValueAvailable || $parameter->is_vararg, StubProblemType::WRONG_PARAMETER_DEFAULT_VALUE ) as $parameter) { yield "$class->name::$method->name($parameter->name)" => [$class, $method, $parameter]; From d499a2f314941f737b31e97830b15af6e05e08a3 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Wed, 13 Sep 2023 16:07:02 +0200 Subject: [PATCH 55/73] [phpstorm-stubs] test commit. --- tests/StubsConstantsAndParametersValuesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/StubsConstantsAndParametersValuesTest.php b/tests/StubsConstantsAndParametersValuesTest.php index 43359ce32..bcb837649 100644 --- a/tests/StubsConstantsAndParametersValuesTest.php +++ b/tests/StubsConstantsAndParametersValuesTest.php @@ -135,7 +135,7 @@ public function testMethodsWithoutOptionalDefaultParametersValue(PHPClass|PHPInt self::assertTrue(empty($stubOptionalParameter->defaultValue), sprintf( - 'Stub method %s::%s has a parameter "%s" which expected to have no default value but it has', + 'Stub method %s::%s has a parameter "%s" which expected to have no default value but it has ', $class->name, $method->name, $stubOptionalParameter->name From b0598dc805445714bf36abc0f99d9e4be784d720 Mon Sep 17 00:00:00 2001 From: LolGleb Date: Wed, 13 Sep 2023 16:08:01 +0200 Subject: [PATCH 56/73] [phpstorm-stubs] revert test commit. --- tests/StubsConstantsAndParametersValuesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/StubsConstantsAndParametersValuesTest.php b/tests/StubsConstantsAndParametersValuesTest.php index bcb837649..43359ce32 100644 --- a/tests/StubsConstantsAndParametersValuesTest.php +++ b/tests/StubsConstantsAndParametersValuesTest.php @@ -135,7 +135,7 @@ public function testMethodsWithoutOptionalDefaultParametersValue(PHPClass|PHPInt self::assertTrue(empty($stubOptionalParameter->defaultValue), sprintf( - 'Stub method %s::%s has a parameter "%s" which expected to have no default value but it has ', + 'Stub method %s::%s has a parameter "%s" which expected to have no default value but it has', $class->name, $method->name, $stubOptionalParameter->name From ed9f6d8b529826bfb82b5d39b2d3697cbfc962bf Mon Sep 17 00:00:00 2001 From: LolGleb Date: Thu, 14 Sep 2023 09:42:52 +0200 Subject: [PATCH 57/73] [phpstorm-stubs] cs-fixer. --- tests/StubsConstantsAndParametersValuesTest.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/StubsConstantsAndParametersValuesTest.php b/tests/StubsConstantsAndParametersValuesTest.php index 43359ce32..f01db390d 100644 --- a/tests/StubsConstantsAndParametersValuesTest.php +++ b/tests/StubsConstantsAndParametersValuesTest.php @@ -68,14 +68,16 @@ public function testFunctionsWithoutOptionalDefaultParametersValue(PHPFunction $ /** @var PHPParameter $stubOptionalParameter */ $stubOptionalParameter = array_pop($stubParameters); - self::assertTrue(empty($stubOptionalParameter->defaultValue), + self::assertTrue( + empty($stubOptionalParameter->defaultValue), sprintf( 'Stub function "%s" has a parameter "%s" which expected to have no default value but it has', $function->name, $stubOptionalParameter->name ) ); - self::assertTrue($stubOptionalParameter->markedOptionalInPhpDoc, + self::assertTrue( + $stubOptionalParameter->markedOptionalInPhpDoc, sprintf( 'Stub function "%s" has a parameter "%s" which expected to be marked as [optional] at PHPDoc but it is not', $function->name, @@ -133,15 +135,17 @@ public function testMethodsWithoutOptionalDefaultParametersValue(PHPClass|PHPInt /** @var PHPParameter $stubOptionalParameter */ $stubOptionalParameter = array_pop($stubParameters); - self::assertTrue(empty($stubOptionalParameter->defaultValue), + self::assertTrue( + empty($stubOptionalParameter->defaultValue), sprintf( 'Stub method %s::%s has a parameter "%s" which expected to have no default value but it has', $class->name, $method->name, $stubOptionalParameter->name ) - ); - self::assertTrue($stubOptionalParameter->markedOptionalInPhpDoc, + ); + self::assertTrue( + $stubOptionalParameter->markedOptionalInPhpDoc, sprintf( 'Stub method %s::%s has a parameter "%s" which expected to be marked as [optional] at PHPDoc but it is not', $class->name, From 056963947791367370aa2a593b439ad1631af86f Mon Sep 17 00:00:00 2001 From: Brett McBride Date: Tue, 2 May 2023 20:41:01 +1000 Subject: [PATCH 58/73] adding opentelemetry extension stubs --- PhpStormStubsMap.php | 1 + opentelemetry/opentelemetry.php | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 opentelemetry/opentelemetry.php diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index 69270a021..4bbb35d19 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -1385,6 +1385,7 @@ final class PhpStormStubsMap 'MongoDB\\BSON\\toRelaxedExtendedJSON' => 'mongodb/BSON/functions.php', 'MongoDB\\Driver\\Monitoring\\addSubscriber' => 'mongodb/Monitoring/functions.php', 'MongoDB\\Driver\\Monitoring\\removeSubscriber' => 'mongodb/Monitoring/functions.php', + 'OpenTelemetry\\Instrumentation\\hook' => 'opentelemetry/opentelemetry.php', 'PDF_activate_item' => 'pdflib/PDFlib.php', 'PDF_add_launchlink' => 'pdflib/PDFlib.php', 'PDF_add_locallink' => 'pdflib/PDFlib.php', diff --git a/opentelemetry/opentelemetry.php b/opentelemetry/opentelemetry.php new file mode 100644 index 000000000..5aa2c42f6 --- /dev/null +++ b/opentelemetry/opentelemetry.php @@ -0,0 +1,23 @@ + Date: Tue, 22 Aug 2023 08:49:54 +1000 Subject: [PATCH 59/73] adding opentelemetry to PhpCoreStubsProvider --- tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php b/tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php index 420eb3f87..82cfc3faf 100644 --- a/tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php +++ b/tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php @@ -124,6 +124,7 @@ class PhpCoreStubsProvider 'mysql_xdevapi', 'ncurses', 'oauth', + 'opentelemetry', 'pam', 'parallel', 'Parle', From 0096b3ccd4102acf967ee66814fee75b7722168d Mon Sep 17 00:00:00 2001 From: Brett McBride Date: Tue, 3 Oct 2023 09:03:14 +1100 Subject: [PATCH 60/73] fixing param typehint --- opentelemetry/opentelemetry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentelemetry/opentelemetry.php b/opentelemetry/opentelemetry.php index 5aa2c42f6..564644888 100644 --- a/opentelemetry/opentelemetry.php +++ b/opentelemetry/opentelemetry.php @@ -5,7 +5,7 @@ use Closure; /** - * @param string|null $class The (optional) hooked function's class. Null for a global/built-in function. + * @param string|null $class The hooked function's class. Null for a global/built-in function. * @param string $function The hooked function's name. * @param Closure|null $pre function($class, array $params, string $class, string $function, ?string $filename, ?int $lineno): $params * You may optionally return modified parameters. @@ -16,7 +16,7 @@ * @see https://github.com/open-telemetry/opentelemetry-php-instrumentation */ function hook( - ?string $class, + string|null $class, string $function, ?Closure $pre = null, ?Closure $post = null, From eeda88f957475b36e9974a7ac69380c1a36a8aea Mon Sep 17 00:00:00 2001 From: Jon <24463871+j-applese3d@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:24:33 -0700 Subject: [PATCH 61/73] get rid of misleading version string --- standard/standard_9.php | 1 - 1 file changed, 1 deletion(-) diff --git a/standard/standard_9.php b/standard/standard_9.php index cf0d340de..03b005473 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -113,7 +113,6 @@ function array_values(array $array): array {} function array_count_values(array $array): array {} /** - * (PHP 5 >=5.5.0)
* Return the values from a single column in the input array * @link https://secure.php.net/manual/en/function.array-column.php * @param array $array

A multi-dimensional array (record set) from which to pull a column of values.

From 63fb4120aef7802b708d308e1bfb4a3aac98466e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Fri, 6 Oct 2023 09:42:01 -0700 Subject: [PATCH 62/73] sync stubs with Relay v0.6.8 --- PhpStormStubsMap.php | 1 + relay/Relay.php | 49 +++++++++++++++++++++-------- relay/Sentinel.php | 10 ++++-- relay/Table.php | 73 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 15 deletions(-) create mode 100644 relay/Table.php diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php index 4bbb35d19..d7164f8e7 100644 --- a/PhpStormStubsMap.php +++ b/PhpStormStubsMap.php @@ -872,6 +872,7 @@ final class PhpStormStubsMap 'Relay\\KeyType' => 'relay/KeyType.php', 'Relay\\Relay' => 'relay/Relay.php', 'Relay\\Sentinel' => 'relay/Sentinel.php', + 'Relay\\Table' => 'relay/Table.php', 'ResourceBundle' => 'intl/intl.php', 'ReturnTypeWillChange' => 'Core/Core_c.php', 'RuntimeException' => 'SPL/SPL.php', diff --git a/relay/Relay.php b/relay/Relay.php index 184b5d908..8962353bb 100644 --- a/relay/Relay.php +++ b/relay/Relay.php @@ -12,14 +12,14 @@ class Relay * * @var string */ - public const VERSION = "0.6.2"; + public const VERSION = "0.6.8"; /** * Relay's version. * * @var string */ - public const Version = "0.6.2"; + public const Version = "0.6.8"; /** * Integer representing no compression algorithm. @@ -407,7 +407,7 @@ class Relay /** * Establishes a new connection to Redis, or re-uses already opened connection. * - * @param string $host + * @param string|array|null $host * @param int $port * @param float $connect_timeout * @param float $command_timeout @@ -415,11 +415,12 @@ class Relay */ #[\Relay\Attributes\Server] public function __construct( - string $host = null, + string|array|null $host = null, int $port = 6379, float $connect_timeout = 0.0, float $command_timeout = 0.0, - #[\SensitiveParameter] array $context = [], + #[\SensitiveParameter] + array $context = [], int $database = 0, ) {} @@ -445,7 +446,8 @@ public function connect( ?string $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0.0, - #[\SensitiveParameter] array $context = [], + #[\SensitiveParameter] + array $context = [], int $database = 0 ): bool {} @@ -470,7 +472,8 @@ public function pconnect( ?string $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0.0, - #[\SensitiveParameter] array $context = [], + #[\SensitiveParameter] + array $context = [], int $database = 0 ): bool {} @@ -813,10 +816,10 @@ public static function license(): array {} * - `stats.ops_per_sec`: The number of commands processed per second * - `stats.bytes_sent`: The number of bytes Relay has written to the network * - `stats.bytes_received`: The number of bytes Relay has read from the network - * - `stats.command_usec`: The number of microseconds Relay has spent executing commands - * - `stats.rinit_usec`: The number of microseconds Relay has spent in request initialization. - * - `stats.rshutdown_usec`: The number of microseconds Relay has spent in request shutdown. - * - `stats.sigio_usec`: The number of microseconds Relay has spent in its SIGIO handler. + * - `stats.command_usec`: Deprecated + * - `stats.rinit_usec`: The number of microseconds Relay has spent in request initialization + * - `stats.rshutdown_usec`: The number of microseconds Relay has spent in request shutdown + * - `stats.sigio_usec`: The number of microseconds Relay has spent in its SIGIO handler * * - `memory.total`: The total bytes of allocated memory * - `memory.limit`: The capped number of bytes Relay has available to use @@ -1016,7 +1019,8 @@ public function migrate( int $timeout, bool $copy = false, bool $replace = false, - #[\SensitiveParameter] mixed $credentials = null + #[\SensitiveParameter] + mixed $credentials = null ): Relay|bool {} /** @@ -1403,6 +1407,17 @@ public function getbit(mixed $key, int $pos): Relay|int|false {} #[\Relay\Attributes\RedisCommand, \Relay\Attributes\Cached] public function bitcount(mixed $key, int $start = 0, int $end = -1, bool $by_bit = false): Relay|int|false {} + /** + * Perform various bitfield operations on a string key, such as getting/setting bit ranges, + * incrementing, etc. + * + * @param mixed $key + * @param mixed $args,... + * @return Relay|array|false + */ + #[\Relay\Attributes\RedisCommand] + public function bitfield(mixed $key, mixed ...$args): Relay|array|false {} + /** * This is a container command for runtime configuration commands. * @@ -1577,6 +1592,16 @@ public function psetex(mixed $key, int $milliseconds, mixed $value): Relay|bool #[\Relay\Attributes\RedisCommand] public function publish(string $channel, string $message): Relay|int|false {} + /** + * A container command for Pub/Sub introspection commands. + * + * @param string $operation + * @param mixed $args,... + * @return mixed + */ + #[\Relay\Attributes\RedisCommand] + public function pubsub(string $operation, mixed ...$args): mixed {} + /** * Posts a message to the given shard channel. * diff --git a/relay/Sentinel.php b/relay/Sentinel.php index e2a14c4df..fdd99a00d 100644 --- a/relay/Sentinel.php +++ b/relay/Sentinel.php @@ -27,7 +27,10 @@ class Sentinel /** * Establishes a new connection to a Sentinel instance. * - * @param string $host + * For backwards compatibility with PhpRedis 6.x, the + * constructor may be called with a single options array. + * + * @param array|string|null $host * @param int $port * @param float $timeout * @param mixed $persistent @@ -37,13 +40,14 @@ class Sentinel */ #[\Relay\Attributes\Server] public function __construct( - string $host, + array|string|null $host = null, int $port = 26379, float $timeout = 0, mixed $persistent = null, int $retry_interval = 0, float $read_timeout = 0, - #[\SensitiveParameter] mixed $auth = null + #[\SensitiveParameter] + mixed $auth = null ) {} /** diff --git a/relay/Table.php b/relay/Table.php new file mode 100644 index 000000000..3225c003d --- /dev/null +++ b/relay/Table.php @@ -0,0 +1,73 @@ + Date: Fri, 6 Oct 2023 09:48:23 -0700 Subject: [PATCH 63/73] fix Table stub --- relay/Table.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/relay/Table.php b/relay/Table.php index 3225c003d..0ec5ee437 100644 --- a/relay/Table.php +++ b/relay/Table.php @@ -12,7 +12,7 @@ class Table * * @param int $serializer */ - public function __construct(int $serializer = \Relay\Relay::SERIALIZER_PHP); + public function __construct(int $serializer = \Relay\Relay::SERIALIZER_PHP) {} /** * Get a key from the table. @@ -21,7 +21,7 @@ public function __construct(int $serializer = \Relay\Relay::SERIALIZER_PHP); * @param string $key * @return mixed */ - public function get(string $key): mixed; + public function get(string $key): mixed {} /** * Get a field of a cached key. This is an array lookup. @@ -30,7 +30,7 @@ public function get(string $key): mixed; * @param string $field * @return mixed */ - public function getField(string $key, string $field): mixed; + public function getField(string $key, string $field): mixed {} /** * Set a key in the table. @@ -39,7 +39,7 @@ public function getField(string $key, string $field): mixed; * @param mixed $value; * @return bool */ - public function set(string $key, mixed $value): bool; + public function set(string $key, mixed $value): bool {} /** * Check if a key exists in the table. @@ -47,7 +47,7 @@ public function set(string $key, mixed $value): bool; * @param string $key * @return bool */ - public function exists(string $key): bool; + public function exists(string $key): bool {} /** * Remove a key from the table. @@ -55,19 +55,19 @@ public function exists(string $key): bool; * @param string $key * @return bool */ - public function delete(string $key): bool; + public function delete(string $key): bool {} /** * Removes all keys from the table. * * @return bool */ - public function clear(): bool; + public function clear(): bool {} /** * Get the number of keys stored in the table. * * @return int */ - public function count(): int; -} \ No newline at end of file + public function count(): int {} +} From f17790083dfe441db94fd96ff139dc5e54f336c4 Mon Sep 17 00:00:00 2001 From: schlndh Date: Fri, 13 Oct 2023 12:35:24 +0200 Subject: [PATCH 64/73] fix SplHeap::extract phpdoc return type --- SPL/SPL_c1.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPL/SPL_c1.php b/SPL/SPL_c1.php index 402779ade..23815b60e 100644 --- a/SPL/SPL_c1.php +++ b/SPL/SPL_c1.php @@ -1372,7 +1372,7 @@ abstract class SplHeap implements Iterator, Countable /** * Extracts a node from top of the heap and sift up. * @link https://php.net/manual/en/splheap.extract.php - * @return mixed The value of the extracted node. + * @return TValue The value of the extracted node. */ #[TentativeType] public function extract(): mixed {} From 26462cb5c09c983cfd9beb78ec47b75f5cb8c162 Mon Sep 17 00:00:00 2001 From: Evgeny Mazovetskiy Date: Thu, 12 Oct 2023 11:06:20 +0200 Subject: [PATCH 65/73] more accurate replacement for utf8_encode and utf8_decode The problem is that both deprecated functions convert unconditionally between utf-8 and iso-8859-1. But mb_convert_encoding works differently if the from_encoding parameter is missing: " If from_encoding is omitted or null, the mbstring.internal_encoding setting will be used if set, otherwise the default_charset setting." --- standard/basic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/standard/basic.php b/standard/basic.php index 4bf527e93..50fb3ea9c 100644 --- a/standard/basic.php +++ b/standard/basic.php @@ -81,7 +81,7 @@ function is_iterable(mixed $value): bool {} * @deprecated 8.2 Consider to use {@link mb_convert_encoding}, {@link UConverter::transcode()} or {@link iconv()} */ #[Pure] -#[Deprecated(replacement: "mb_convert_encoding(%parameter0%, 'UTF-8')", since: "8.2")] +#[Deprecated(replacement: "mb_convert_encoding(%parameter0%, 'UTF-8', 'ISO-8859-1')", since: "8.2")] function utf8_encode(string $string): string {} /** @@ -95,7 +95,7 @@ function utf8_encode(string $string): string {} * @deprecated 8.2 Consider to use {@link mb_convert_encoding}, {@link UConverter::transcode()} or {@link iconv()} */ #[Pure] -#[Deprecated(replacement: "mb_convert_encoding(%parameter0%, 'ISO-8859-1')", since: "8.2")] +#[Deprecated(replacement: "mb_convert_encoding(%parameter0%, 'ISO-8859-1', 'UTF-8')", since: "8.2")] function utf8_decode(string $string): string {} /** From 86c2d3c470409e5841908bfc6392d3ef10233111 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Tue, 24 Oct 2023 22:56:27 +0200 Subject: [PATCH 66/73] Update phpredis docs of timeout option Ref: https://github.com/phpredis/phpredis/pull/1983/files --- redis/Redis.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/redis/Redis.php b/redis/Redis.php index f6146b689..f01caf329 100644 --- a/redis/Redis.php +++ b/redis/Redis.php @@ -154,10 +154,10 @@ public function __construct($options = null) {} * * @param string $host can be a host, or the path to a unix domain socket * @param int $port optional - * @param float $timeout value in seconds (optional, default is 0.0 meaning unlimited) + * @param float $timeout value in seconds (optional, default is 0.0 meaning it will use `default_socket_timeout`) * @param string|null $persistent_id identity for the requested persistent connection * @param int $retry_interval retry interval in milliseconds. - * @param float $read_timeout value in seconds (optional, default is 0 meaning unlimited) + * @param float $read_timeout value in seconds (optional, default is 0 meaning it will use `default_socket_timeout`) * @param array|null $context since PhpRedis >= 5.3.0 can specify authentication and stream information on connect * * @return bool TRUE on success, FALSE on error @@ -189,10 +189,10 @@ public function connect( * * @param string $host can be a host, or the path to a unix domain socket * @param int $port optional - * @param float $timeout value in seconds (optional, default is 0.0 meaning unlimited) + * @param float $timeout value in seconds (optional, default is 0.0 meaning it will use `default_socket_timeout`) * @param string $persistent_id identity for the requested persistent connection * @param int $retry_interval retry interval in milliseconds. - * @param float $read_timeout value in seconds (optional, default is 0 meaning unlimited) + * @param float $read_timeout value in seconds (optional, default is 0 meaning it will use `default_socket_timeout`) * @param array $context since PhpRedis >= 5.3.0 can specify authentication and stream information on connect * * @return bool TRUE on success, FALSE on error @@ -304,10 +304,10 @@ public function getAuth() {} * * @param string $host can be a host, or the path to a unix domain socket * @param int $port optional - * @param float $timeout value in seconds (optional, default is 0.0 meaning unlimited) + * @param float $timeout value in seconds (optional, default is 0.0 meaning it will use `default_socket_timeout`) * @param string|null $persistent_id identity for the requested persistent connection * @param int $retry_interval retry interval in milliseconds. - * @param float $read_timeout value in seconds (optional, default is 0 meaning unlimited) + * @param float $read_timeout value in seconds (optional, default is 0 meaning it will use `default_socket_timeout`) * @param array|null $context since PhpRedis >= 5.3.0 can specify authentication and stream information on connect * * @return bool TRUE on success, FALSE on error. From 290cc67092434f89c3bdb21f53a746df15e442e8 Mon Sep 17 00:00:00 2001 From: Artemy Pestretsov Date: Mon, 30 Oct 2023 11:31:15 +0100 Subject: [PATCH 67/73] WI-74324 PHP8.3 Deprecations: deprecate NumberFormatter::TYPE_CURRENCY, MT_RAND_PHP constants --- intl/intl.php | 1 + standard/standard_defines.php | 1 + 2 files changed, 2 insertions(+) diff --git a/intl/intl.php b/intl/intl.php index a328d1c5c..478c2f451 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -914,6 +914,7 @@ class NumberFormatter /** * Format/parse as currency value * @link https://php.net/manual/en/class.numberformatter.php#intl.numberformatter-constants + * @deprecated 8.3 */ public const TYPE_CURRENCY = 4; diff --git a/standard/standard_defines.php b/standard/standard_defines.php index d08e6d4ad..51a3b1117 100644 --- a/standard/standard_defines.php +++ b/standard/standard_defines.php @@ -1267,6 +1267,7 @@ define("MT_RAND_MT19937", 0); /** * @since 7.1 + * @deprecated 8.3 */ define("MT_RAND_PHP", 1); From 1f6e11802b10ee218762dbd5d9b80974d33d6f51 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 30 Oct 2023 18:13:52 +0100 Subject: [PATCH 68/73] [phpstorm-stubs] update Dockerfile for 8.3 to RC5 --- tests/DockerImages/8.3/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/DockerImages/8.3/Dockerfile b/tests/DockerImages/8.3/Dockerfile index 648f1f1d8..a783329c6 100644 --- a/tests/DockerImages/8.3/Dockerfile +++ b/tests/DockerImages/8.3/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.3.0RC1-alpine +FROM php:8.3.0RC5-alpine RUN set -eux; \ apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community --no-cache --virtual .build-deps \ From ccdaadeec0718ba9f68124428555b1067d90a101 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 30 Oct 2023 18:30:23 +0100 Subject: [PATCH 69/73] [phpstorm-stubs] Update DOM stubs for serialization https://github.com/php/php-src/issues/8996 --- dom/dom_c.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dom/dom_c.php b/dom/dom_c.php index 6692cca21..c8d153273 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -390,6 +390,16 @@ public function contains(DOMNode|DOMNameSpaceNode|null $other): bool {} * @since 8.3 */ public function getRootNode(?array $options = null): DOMNode {} + + /** + * @since 8.1 + */ + public function __sleep() {} + + /** + * @since 8.1 + */ + public function __wakeup() {} } /** @@ -578,6 +588,16 @@ class DOMNameSpaceNode public $nodeName; public ?DOMElement $parentElement; public bool $isConnected; + + /** + * @since 8.1 + */ + public function __sleep(): array {} + + /** + * @since 8.1 + */ + public function __wakeup(): void {} } /** From 82d7d4444ea02555fa9877c026df9a9ffeb33b64 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 30 Oct 2023 18:33:43 +0100 Subject: [PATCH 70/73] [phpstorm-stubs] Update return type for xml_parse_into_struct --- xml/xml.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml/xml.php b/xml/xml.php index 151fa8399..a66b10028 100644 --- a/xml/xml.php +++ b/xml/xml.php @@ -371,7 +371,8 @@ function xml_parse(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "re * success. This is not the same as FALSE and TRUE, be careful with * operators such as ===. */ -function xml_parse_into_struct(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, string $data, &$values, &$index): int {} +#[LanguageLevelTypeAware(['8.1' => 'int|false'], default: 'int')] +function xml_parse_into_struct(#[LanguageLevelTypeAware(["8.0" => "XMLParser"], default: "resource")] $parser, string $data, &$values, &$index) {} /** * Get XML parser error code From 57f671c2c5cc5935f96010d126b5db1e27c61659 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 30 Oct 2023 18:34:06 +0100 Subject: [PATCH 71/73] [phpstorm-stubs] Update value of PCRE_VERSION_MINOR --- pcre/pcre.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcre/pcre.php b/pcre/pcre.php index 7baccb4d3..17aee6e70 100644 --- a/pcre/pcre.php +++ b/pcre/pcre.php @@ -629,7 +629,7 @@ function preg_last_error_msg(): string {} /** * @since 7.3 */ -define('PCRE_VERSION_MINOR', 40); +define('PCRE_VERSION_MINOR', 42); /** * @since 7.3 From 1720f96770005c3878c89b1e8c618251820a6d40 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Mon, 30 Oct 2023 19:39:14 +0100 Subject: [PATCH 72/73] [phpstorm-stubs] Fix return type of DOMNode::__sleep and DOMNode::__wakeup --- dom/dom_c.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/dom_c.php b/dom/dom_c.php index c8d153273..69cd4c433 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -394,12 +394,12 @@ public function getRootNode(?array $options = null): DOMNode {} /** * @since 8.1 */ - public function __sleep() {} + public function __sleep(): array {} /** * @since 8.1 */ - public function __wakeup() {} + public function __wakeup(): void {} } /** From 99d8bcab934ae5362f33660b1cd4b8c4d617c40b Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Wed, 1 Nov 2023 19:52:29 +0100 Subject: [PATCH 73/73] [phpstorm-stubs] deprecate dba_fetch with 3 parameters since 8.3 https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures --- dba/dba.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dba/dba.php b/dba/dba.php index fbf439622..773a54df4 100644 --- a/dba/dba.php +++ b/dba/dba.php @@ -1,6 +1,7 @@ FALSE * otherwise. */ +#[Deprecated(since: 8.3)] function dba_fetch($key, $skip, $dba): string|false {} /**