Skip to content

Commit 70d451d

Browse files
committed
Update stubs
1 parent 4250e4b commit 70d451d

File tree

241 files changed

+8553
-1279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+8553
-1279
lines changed

Diff for: Php8StubsMap.php

+91
Original file line numberDiff line numberDiff line change
@@ -2750,6 +2750,97 @@ public function __construct(int $phpVersionId)
27502750
]);
27512751
}
27522752

2753+
if ($phpVersionId >= 80400) {
2754+
$classes = \array_merge($classes, [
2755+
'dba\\connection' => 'stubs/ext/dba/Dba/Connection.php',
2756+
'deprecated' => 'stubs/Zend/Deprecated.php',
2757+
'dom\\attr' => 'stubs/ext/dom/Dom/Attr.php',
2758+
'dom\\cdatasection' => 'stubs/ext/dom/Dom/CDATASection.php',
2759+
'dom\\characterdata' => 'stubs/ext/dom/Dom/CharacterData.php',
2760+
'dom\\childnode' => 'stubs/ext/dom/Dom/ChildNode.php',
2761+
'dom\\comment' => 'stubs/ext/dom/Dom/Comment.php',
2762+
'dom\\document' => 'stubs/ext/dom/Dom/Document.php',
2763+
'dom\\documentfragment' => 'stubs/ext/dom/Dom/DocumentFragment.php',
2764+
'dom\\documenttype' => 'stubs/ext/dom/Dom/DocumentType.php',
2765+
'dom\\dtdnamednodemap' => 'stubs/ext/dom/Dom/DtdNamedNodeMap.php',
2766+
'dom\\element' => 'stubs/ext/dom/Dom/Element.php',
2767+
'dom\\entity' => 'stubs/ext/dom/Dom/Entity.php',
2768+
'dom\\entityreference' => 'stubs/ext/dom/Dom/EntityReference.php',
2769+
'dom\\htmlcollection' => 'stubs/ext/dom/Dom/HTMLCollection.php',
2770+
'dom\\htmldocument' => 'stubs/ext/dom/Dom/HTMLDocument.php',
2771+
'dom\\htmlelement' => 'stubs/ext/dom/Dom/HTMLElement.php',
2772+
'dom\\implementation' => 'stubs/ext/dom/Dom/Implementation.php',
2773+
'dom\\namednodemap' => 'stubs/ext/dom/Dom/NamedNodeMap.php',
2774+
'dom\\namespaceinfo' => 'stubs/ext/dom/Dom/NamespaceInfo.php',
2775+
'dom\\node' => 'stubs/ext/dom/Dom/Node.php',
2776+
'dom\\nodelist' => 'stubs/ext/dom/Dom/NodeList.php',
2777+
'dom\\notation' => 'stubs/ext/dom/Dom/Notation.php',
2778+
'dom\\parentnode' => 'stubs/ext/dom/Dom/ParentNode.php',
2779+
'dom\\processinginstruction' => 'stubs/ext/dom/Dom/ProcessingInstruction.php',
2780+
'dom\\text' => 'stubs/ext/dom/Dom/Text.php',
2781+
'dom\\tokenlist' => 'stubs/ext/dom/Dom/TokenList.php',
2782+
'dom\\xmldocument' => 'stubs/ext/dom/Dom/XMLDocument.php',
2783+
'dom\\xpath' => 'stubs/ext/dom/Dom/XPath.php',
2784+
'odbc\\connection' => 'stubs/ext/odbc/Odbc/Connection.php',
2785+
'odbc\\result' => 'stubs/ext/odbc/Odbc/Result.php',
2786+
'pdo\\dblib' => 'stubs/ext/pdo_dblib/Pdo/Dblib.php',
2787+
'pdo\\firebird' => 'stubs/ext/pdo_firebird/Pdo/Firebird.php',
2788+
'pdo\\mysql' => 'stubs/ext/pdo_mysql/Pdo/Mysql.php',
2789+
'pdo\\odbc' => 'stubs/ext/pdo_odbc/Pdo/Odbc.php',
2790+
'pdo\\pgsql' => 'stubs/ext/pdo_pgsql/Pdo/Pgsql.php',
2791+
'pdo\\sqlite' => 'stubs/ext/pdo_sqlite/Pdo/Sqlite.php',
2792+
'reflectionconstant' => 'stubs/ext/reflection/ReflectionConstant.php',
2793+
'requestparsebodyexception' => 'stubs/Zend/RequestParseBodyException.php',
2794+
'soap\\sdl' => 'stubs/ext/soap/Soap/Sdl.php',
2795+
'soap\\url' => 'stubs/ext/soap/Soap/Url.php',
2796+
'streambucket' => 'stubs/ext/standard/StreamBucket.php',
2797+
]);
2798+
2799+
$functions = \array_merge($functions, [
2800+
'array_all' => 'stubs/ext/standard/array_all.php',
2801+
'array_any' => 'stubs/ext/standard/array_any.php',
2802+
'array_find' => 'stubs/ext/standard/array_find.php',
2803+
'array_find_key' => 'stubs/ext/standard/array_find_key.php',
2804+
'bcceil' => 'stubs/ext/bcmath/bcceil.php',
2805+
'bcfloor' => 'stubs/ext/bcmath/bcfloor.php',
2806+
'bcround' => 'stubs/ext/bcmath/bcround.php',
2807+
'dom\\adjacentposition' => 'stubs/ext/dom/Dom/AdjacentPosition.php',
2808+
'dom\\import_simplexml' => 'stubs/ext/dom/Dom/import_simplexml.php',
2809+
'fpow' => 'stubs/ext/standard/fpow.php',
2810+
'grapheme_str_split' => 'stubs/ext/intl/grapheme_str_split.php',
2811+
'http_clear_last_response_headers' => 'stubs/ext/standard/http_clear_last_response_headers.php',
2812+
'http_get_last_response_headers' => 'stubs/ext/standard/http_get_last_response_headers.php',
2813+
'intltz_get_iana_id' => 'stubs/ext/intl/intltz_get_iana_id.php',
2814+
'mb_lcfirst' => 'stubs/ext/mbstring/mb_lcfirst.php',
2815+
'mb_ltrim' => 'stubs/ext/mbstring/mb_ltrim.php',
2816+
'mb_rtrim' => 'stubs/ext/mbstring/mb_rtrim.php',
2817+
'mb_trim' => 'stubs/ext/mbstring/mb_trim.php',
2818+
'mb_ucfirst' => 'stubs/ext/mbstring/mb_ucfirst.php',
2819+
'pcntl_getcpu' => 'stubs/ext/pcntl/pcntl_getcpu.php',
2820+
'pcntl_getcpuaffinity' => 'stubs/ext/pcntl/pcntl_getcpuaffinity.php',
2821+
'pcntl_getqos_class' => 'stubs/ext/pcntl/pcntl_getqos_class.php',
2822+
'pcntl_setcpuaffinity' => 'stubs/ext/pcntl/pcntl_setcpuaffinity.php',
2823+
'pcntl_setns' => 'stubs/ext/pcntl/pcntl_setns.php',
2824+
'pcntl_setqos_class' => 'stubs/ext/pcntl/pcntl_setqos_class.php',
2825+
'pcntl_waitid' => 'stubs/ext/pcntl/pcntl_waitid.php',
2826+
'pg_change_password' => 'stubs/ext/pgsql/pg_change_password.php',
2827+
'pg_jit' => 'stubs/ext/pgsql/pg_jit.php',
2828+
'pg_put_copy_data' => 'stubs/ext/pgsql/pg_put_copy_data.php',
2829+
'pg_put_copy_end' => 'stubs/ext/pgsql/pg_put_copy_end.php',
2830+
'pg_result_memory_size' => 'stubs/ext/pgsql/pg_result_memory_size.php',
2831+
'pg_set_chunked_rows_size' => 'stubs/ext/pgsql/pg_set_chunked_rows_size.php',
2832+
'pg_socket_poll' => 'stubs/ext/pgsql/pg_socket_poll.php',
2833+
'qosclass' => 'stubs/ext/pcntl/QosClass.php',
2834+
'request_parse_body' => 'stubs/ext/standard/request_parse_body.php',
2835+
'sodium_crypto_aead_aegis128l_decrypt' => 'stubs/ext/sodium/sodium_crypto_aead_aegis128l_decrypt.php',
2836+
'sodium_crypto_aead_aegis128l_encrypt' => 'stubs/ext/sodium/sodium_crypto_aead_aegis128l_encrypt.php',
2837+
'sodium_crypto_aead_aegis128l_keygen' => 'stubs/ext/sodium/sodium_crypto_aead_aegis128l_keygen.php',
2838+
'sodium_crypto_aead_aegis256_decrypt' => 'stubs/ext/sodium/sodium_crypto_aead_aegis256_decrypt.php',
2839+
'sodium_crypto_aead_aegis256_encrypt' => 'stubs/ext/sodium/sodium_crypto_aead_aegis256_encrypt.php',
2840+
'sodium_crypto_aead_aegis256_keygen' => 'stubs/ext/sodium/sodium_crypto_aead_aegis256_keygen.php',
2841+
]);
2842+
}
2843+
27532844
// UPDATE BELONGS HERE
27542845

27552846
$this->classes = $classes;

Diff for: stubs/Zend/Attribute.php

+24-24
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,86 @@
33
/** @generate-function-entries */
44
final class Attribute
55
{
6-
public function __construct(int $flags = Attribute::TARGET_ALL)
7-
{
8-
}
96
/**
107
* @var int
118
* @cvalue ZEND_ATTRIBUTE_TARGET_CLASS
129
*/
1310
#[\Since('8.2')]
1411
#[\Until('8.3')]
1512
const TARGET_CLASS = UNKNOWN;
16-
/** @cvalue ZEND_ATTRIBUTE_TARGET_CLASS */
17-
#[\Since('8.3')]
18-
const int TARGET_CLASS = UNKNOWN;
1913
/**
2014
* @var int
2115
* @cvalue ZEND_ATTRIBUTE_TARGET_FUNCTION
2216
*/
2317
#[\Since('8.2')]
2418
#[\Until('8.3')]
2519
const TARGET_FUNCTION = UNKNOWN;
26-
/** @cvalue ZEND_ATTRIBUTE_TARGET_FUNCTION */
27-
#[\Since('8.3')]
28-
const int TARGET_FUNCTION = UNKNOWN;
2920
/**
3021
* @var int
3122
* @cvalue ZEND_ATTRIBUTE_TARGET_METHOD
3223
*/
3324
#[\Since('8.2')]
3425
#[\Until('8.3')]
3526
const TARGET_METHOD = UNKNOWN;
36-
/** @cvalue ZEND_ATTRIBUTE_TARGET_METHOD */
37-
#[\Since('8.3')]
38-
const int TARGET_METHOD = UNKNOWN;
3927
/**
4028
* @var int
4129
* @cvalue ZEND_ATTRIBUTE_TARGET_PROPERTY
4230
*/
4331
#[\Since('8.2')]
4432
#[\Until('8.3')]
4533
const TARGET_PROPERTY = UNKNOWN;
46-
/** @cvalue ZEND_ATTRIBUTE_TARGET_PROPERTY */
47-
#[\Since('8.3')]
48-
const int TARGET_PROPERTY = UNKNOWN;
4934
/**
5035
* @var int
5136
* @cvalue ZEND_ATTRIBUTE_TARGET_CLASS_CONST
5237
*/
5338
#[\Since('8.2')]
5439
#[\Until('8.3')]
5540
const TARGET_CLASS_CONSTANT = UNKNOWN;
56-
/** @cvalue ZEND_ATTRIBUTE_TARGET_CLASS_CONST */
57-
#[\Since('8.3')]
58-
const int TARGET_CLASS_CONSTANT = UNKNOWN;
5941
/**
6042
* @var int
6143
* @cvalue ZEND_ATTRIBUTE_TARGET_PARAMETER
6244
*/
6345
#[\Since('8.2')]
6446
#[\Until('8.3')]
6547
const TARGET_PARAMETER = UNKNOWN;
66-
/** @cvalue ZEND_ATTRIBUTE_TARGET_PARAMETER */
67-
#[\Since('8.3')]
68-
const int TARGET_PARAMETER = UNKNOWN;
6948
/**
7049
* @var int
7150
* @cvalue ZEND_ATTRIBUTE_TARGET_ALL
7251
*/
7352
#[\Since('8.2')]
7453
#[\Until('8.3')]
7554
const TARGET_ALL = UNKNOWN;
76-
/** @cvalue ZEND_ATTRIBUTE_TARGET_ALL */
77-
#[\Since('8.3')]
78-
const int TARGET_ALL = UNKNOWN;
7955
/**
8056
* @var int
8157
* @cvalue ZEND_ATTRIBUTE_IS_REPEATABLE
8258
*/
8359
#[\Since('8.2')]
8460
#[\Until('8.3')]
8561
const IS_REPEATABLE = UNKNOWN;
62+
public function __construct(int $flags = Attribute::TARGET_ALL)
63+
{
64+
}
65+
/** @cvalue ZEND_ATTRIBUTE_TARGET_CLASS */
66+
#[\Since('8.3')]
67+
const int TARGET_CLASS = UNKNOWN;
68+
/** @cvalue ZEND_ATTRIBUTE_TARGET_FUNCTION */
69+
#[\Since('8.3')]
70+
const int TARGET_FUNCTION = UNKNOWN;
71+
/** @cvalue ZEND_ATTRIBUTE_TARGET_METHOD */
72+
#[\Since('8.3')]
73+
const int TARGET_METHOD = UNKNOWN;
74+
/** @cvalue ZEND_ATTRIBUTE_TARGET_PROPERTY */
75+
#[\Since('8.3')]
76+
const int TARGET_PROPERTY = UNKNOWN;
77+
/** @cvalue ZEND_ATTRIBUTE_TARGET_CLASS_CONST */
78+
#[\Since('8.3')]
79+
const int TARGET_CLASS_CONSTANT = UNKNOWN;
80+
/** @cvalue ZEND_ATTRIBUTE_TARGET_PARAMETER */
81+
#[\Since('8.3')]
82+
const int TARGET_PARAMETER = UNKNOWN;
83+
/** @cvalue ZEND_ATTRIBUTE_TARGET_ALL */
84+
#[\Since('8.3')]
85+
const int TARGET_ALL = UNKNOWN;
8686
/** @cvalue ZEND_ATTRIBUTE_IS_REPEATABLE */
8787
#[\Since('8.3')]
8888
const int IS_REPEATABLE = UNKNOWN;

Diff for: stubs/Zend/Deprecated.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_FUNCTION | Attribute::TARGET_CLASS_CONSTANT)]
7+
#[\Since('8.4')]
8+
final class Deprecated
9+
{
10+
public readonly ?string $message;
11+
public readonly ?string $since;
12+
public function __construct(?string $message = null, ?string $since = null)
13+
{
14+
}
15+
}

Diff for: stubs/Zend/Generator.php

+4
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ public function throw(Throwable $exception): mixed
2727
public function getReturn(): mixed
2828
{
2929
}
30+
#[\Since('8.4')]
31+
public function __debugInfo(): array
32+
{
33+
}
3034
}

Diff for: stubs/Zend/RequestParseBodyException.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
#[\Since('8.4')]
4+
class RequestParseBodyException extends \Exception
5+
{
6+
}

Diff for: stubs/Zend/trigger_error.php

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
#[\Until('8.4')]
34
function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool
45
{
6+
}
7+
#[\Since('8.4')]
8+
function trigger_error(string $message, int $error_level = E_USER_NOTICE): true
9+
{
510
}

Diff for: stubs/Zend/user_error.php

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?php
22

33
/** @alias trigger_error */
4+
#[\Until('8.4')]
45
function user_error(string $message, int $error_level = E_USER_NOTICE): bool
56
{
7+
}
8+
/** @alias trigger_error */
9+
#[\Since('8.4')]
10+
function user_error(string $message, int $error_level = E_USER_NOTICE): true
11+
{
612
}

Diff for: stubs/ext/bcmath/bcceil.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/** @refcount 1 */
4+
#[\Since('8.4')]
5+
function bcceil(string $num): string
6+
{
7+
}

Diff for: stubs/ext/bcmath/bcfloor.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/** @refcount 1 */
4+
#[\Since('8.4')]
5+
function bcfloor(string $num): string
6+
{
7+
}

Diff for: stubs/ext/bcmath/bcround.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
/** @refcount 1 */
4+
#[\Since('8.4')]
5+
function bcround(string $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): string
6+
{
7+
}

Diff for: stubs/ext/date/DatePeriod.php

+8
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,19 @@ public function getIterator(): Iterator
6969
* @cvalue PHP_DATE_PERIOD_EXCLUDE_START_DATE
7070
*/
7171
#[\Since('8.2')]
72+
#[\Until('8.4')]
7273
public const EXCLUDE_START_DATE = UNKNOWN;
74+
/** @cvalue PHP_DATE_PERIOD_EXCLUDE_START_DATE */
75+
#[\Since('8.4')]
76+
public const int EXCLUDE_START_DATE = UNKNOWN;
7377
/**
7478
* @var int
7579
* @cvalue PHP_DATE_PERIOD_INCLUDE_END_DATE
7680
*/
7781
#[\Since('8.2')]
82+
#[\Until('8.4')]
7883
public const INCLUDE_END_DATE = UNKNOWN;
84+
/** @cvalue PHP_DATE_PERIOD_INCLUDE_END_DATE */
85+
#[\Since('8.4')]
86+
public const int INCLUDE_END_DATE = UNKNOWN;
7987
}

Diff for: stubs/ext/date/DateTime.php

+13
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public static function createFromInterface(DateTimeInterface $object): DateTime
4545
public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)
4646
{
4747
}
48+
/** @tentative-return-type */
49+
#[\Since('8.4')]
50+
public static function createFromTimestamp(int|float $timestamp): static
51+
{
52+
}
4853
/**
4954
* @return array|false
5055
* @alias date_get_last_errors
@@ -106,6 +111,10 @@ public function setTimezone(DateTimeZone $timezone)
106111
public function getOffset()
107112
{
108113
}
114+
#[\Since('8.4')]
115+
public function getMicrosecond(): int
116+
{
117+
}
109118
/**
110119
* @tentative-return-type
111120
* @alias date_time_set
@@ -138,6 +147,10 @@ public function setISODate(int $year, int $week, int $dayOfWeek = 1)
138147
public function setTimestamp(int $timestamp)
139148
{
140149
}
150+
#[\Since('8.4')]
151+
public function setMicrosecond(int $microsecond): static
152+
{
153+
}
141154
/**
142155
* @tentative-return-type
143156
* @alias date_timestamp_get

Diff for: stubs/ext/date/DateTimeImmutable.php

+16
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public static function __set_state(array $array)
3535
public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null)
3636
{
3737
}
38+
/** @tentative-return-type */
39+
#[\Since('8.4')]
40+
public static function createFromTimestamp(int|float $timestamp): static
41+
{
42+
}
3843
/**
3944
* @return array|false
4045
* @alias date_get_last_errors
@@ -74,6 +79,13 @@ public function getOffset()
7479
public function getTimestamp()
7580
{
7681
}
82+
/**
83+
* @alias DateTime::getMicrosecond
84+
*/
85+
#[\Since('8.4')]
86+
public function getMicrosecond(): int
87+
{
88+
}
7789
/**
7890
* @tentative-return-type
7991
* @alias date_diff
@@ -138,6 +150,10 @@ public function setISODate(int $year, int $week, int $dayOfWeek = 1)
138150
public function setTimestamp(int $timestamp)
139151
{
140152
}
153+
#[\Since('8.4')]
154+
public function setMicrosecond(int $microsecond): static
155+
{
156+
}
141157
/**
142158
* @tentative-return-type
143159
* @return DateTimeImmutable

0 commit comments

Comments
 (0)