Skip to content

Commit 2802b16

Browse files
committed
Update stubs
1 parent 56ccadc commit 2802b16

File tree

76 files changed

+437
-15
lines changed

Some content is hidden

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

76 files changed

+437
-15
lines changed

Php8StubsMap.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2717,6 +2717,36 @@ public function __construct(int $phpVersionId)
27172717
]);
27182718
}
27192719

2720+
if ($phpVersionId >= 80300) {
2721+
$classes = \array_merge($classes, [
2722+
'dateerror' => 'stubs/ext/date/DateError.php',
2723+
'dateexception' => 'stubs/ext/date/DateException.php',
2724+
'dateinvalidoperationexception' => 'stubs/ext/date/DateInvalidOperationException.php',
2725+
'dateinvalidtimezoneexception' => 'stubs/ext/date/DateInvalidTimeZoneException.php',
2726+
'datemalformedintervalstringexception' => 'stubs/ext/date/DateMalformedIntervalStringException.php',
2727+
'datemalformedperiodstringexception' => 'stubs/ext/date/DateMalformedPeriodStringException.php',
2728+
'datemalformedstringexception' => 'stubs/ext/date/DateMalformedStringException.php',
2729+
'dateobjecterror' => 'stubs/ext/date/DateObjectError.php',
2730+
'daterangeerror' => 'stubs/ext/date/DateRangeError.php',
2731+
]);
2732+
2733+
$functions = \array_merge($functions, [
2734+
'json_validate' => 'stubs/ext/json/json_validate.php',
2735+
'mb_str_pad' => 'stubs/ext/mbstring/mb_str_pad.php',
2736+
'pg_enter_pipeline_mode' => 'stubs/ext/pgsql/pg_enter_pipeline_mode.php',
2737+
'pg_exit_pipeline_mode' => 'stubs/ext/pgsql/pg_exit_pipeline_mode.php',
2738+
'pg_pipeline_status' => 'stubs/ext/pgsql/pg_pipeline_status.php',
2739+
'pg_pipeline_sync' => 'stubs/ext/pgsql/pg_pipeline_sync.php',
2740+
'pg_set_error_context_visibility' => 'stubs/ext/pgsql/pg_set_error_context_visibility.php',
2741+
'posix_eaccess' => 'stubs/ext/posix/posix_eaccess.php',
2742+
'posix_fpathconf' => 'stubs/ext/posix/posix_fpathconf.php',
2743+
'posix_pathconf' => 'stubs/ext/posix/posix_pathconf.php',
2744+
'posix_sysconf' => 'stubs/ext/posix/posix_sysconf.php',
2745+
'random\\intervalboundary' => 'stubs/ext/random/Random/IntervalBoundary.php',
2746+
'socket_atmark' => 'stubs/ext/sockets/socket_atmark.php',
2747+
]);
2748+
}
2749+
27202750
// UPDATE BELONGS HERE
27212751

27222752
$this->classes = $classes;

stubs/Zend/SensitiveParameterValue.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#[\Since('8.2')]
88
final class SensitiveParameterValue
99
{
10-
private readonly mixed $value;
1110
public function __construct(mixed $value)
1211
{
1312
}

stubs/ext/date/DateError.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateError extends \Error
8+
{
9+
}

stubs/ext/date/DateException.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateException extends \Exception
8+
{
9+
}

stubs/ext/date/DateInterval.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ public function __construct(string $duration)
77
}
88
/**
99
* @tentative-return-type
10-
* @alias date_interval_create_from_date_string
1110
* @return (DateInterval | false)
1211
*/
1312
public static function createFromDateString(string $datetime)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateInvalidOperationException extends \DateException
8+
{
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateInvalidTimeZoneException extends \Exception
8+
{
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateMalformedIntervalStringException extends \DateException
8+
{
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateMalformedPeriodStringException extends \DateException
8+
{
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateMalformedStringException extends \DateException
8+
{
9+
}

stubs/ext/date/DateObjectError.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateObjectError extends \DateError
8+
{
9+
}

stubs/ext/date/DateRangeError.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
/**
4+
* @strict-properties
5+
*/
6+
#[\Since('8.3')]
7+
class DateRangeError extends \DateRangeError
8+
{
9+
}

stubs/ext/date/DateTime.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public function format(string $format)
6262
}
6363
/**
6464
* @tentative-return-type
65-
* @alias date_modify
6665
* @return (DateTime | false)
6766
*/
6867
public function modify(string $modifier)
@@ -78,7 +77,6 @@ public function add(DateInterval $interval)
7877
}
7978
/**
8079
* @tentative-return-type
81-
* @alias date_sub
8280
* @return DateTime
8381
*/
8482
public function sub(DateInterval $interval)

stubs/ext/dom/DOMDocument.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ public function validate()
183183
public function xinclude(int $options = 0)
184184
{
185185
}
186-
/** @return DOMNode|false */
186+
/**
187+
* @tentative-return-type
188+
* @return (DOMNode | false)
189+
*/
187190
public function adoptNode(DOMNode $node)
188191
{
189192
}

stubs/ext/gd/imagegd2.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
#[\Until('8.3')]
34
function imagegd2(\GdImage $image, ?string $file = null, int $chunk_size = UNKNOWN, int $mode = UNKNOWN) : bool
45
{
6+
}
7+
#[\Since('8.3')]
8+
function imagegd2(\GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = IMG_GD2_RAW) : bool
9+
{
510
}

stubs/ext/gd/imagerotate.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
#endif
44
// TODO: $ignore_transparent is ignored???
5+
#[\Until('8.3')]
56
function imagerotate(\GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false) : \GdImage|false
67
{
8+
}
9+
#endif
10+
/** @refcount 1 */
11+
#[\Since('8.3')]
12+
function imagerotate(\GdImage $image, float $angle, int $background_color) : \GdImage|false
13+
{
714
}

stubs/ext/hash/hash_algos.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
/**
4+
* @compile-time-eval
45
* @refcount 1
56
*/
67
function hash_algos() : array

stubs/ext/hash/hash_hmac_algos.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
/**
4+
* @compile-time-eval
45
* @refcount 1
56
*/
67
function hash_hmac_algos() : array

stubs/ext/imap/imap_clearflag_full.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ function imap_clearflag_full($imap, string $sequence, string $flag, int $options
66
{
77
}
88
#[\Since('8.1')]
9+
#[\Until('8.3')]
910
function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0) : bool
1011
{
12+
}
13+
#[\Since('8.3')]
14+
function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0) : true
15+
{
1116
}

stubs/ext/imap/imap_close.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ function imap_close($imap, int $flags = 0) : bool
88
{
99
}
1010
#[\Since('8.1')]
11+
#[\Until('8.3')]
1112
function imap_close(\IMAP\Connection $imap, int $flags = 0) : bool
1213
{
14+
}
15+
#[\Since('8.3')]
16+
function imap_close(\IMAP\Connection $imap, int $flags = 0) : true
17+
{
1318
}

stubs/ext/imap/imap_delete.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ function imap_delete($imap, string $message_nums, int $flags = 0) : bool
88
{
99
}
1010
#[\Since('8.1')]
11+
#[\Until('8.3')]
1112
function imap_delete(\IMAP\Connection $imap, string $message_nums, int $flags = 0) : bool
1213
{
14+
}
15+
#[\Since('8.3')]
16+
function imap_delete(\IMAP\Connection $imap, string $message_nums, int $flags = 0) : true
17+
{
1318
}

stubs/ext/imap/imap_expunge.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ function imap_expunge($imap) : bool
88
{
99
}
1010
#[\Since('8.1')]
11+
#[\Until('8.3')]
1112
function imap_expunge(\IMAP\Connection $imap) : bool
1213
{
14+
}
15+
#[\Since('8.3')]
16+
function imap_expunge(\IMAP\Connection $imap) : true
17+
{
1318
}

stubs/ext/imap/imap_gc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ function imap_gc($imap, int $flags) : bool
88
{
99
}
1010
#[\Since('8.1')]
11+
#[\Until('8.3')]
1112
function imap_gc(\IMAP\Connection $imap, int $flags) : bool
1213
{
14+
}
15+
#[\Since('8.3')]
16+
function imap_gc(\IMAP\Connection $imap, int $flags) : true
17+
{
1318
}

stubs/ext/imap/imap_setflag_full.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ function imap_setflag_full($imap, string $sequence, string $flag, int $options =
66
{
77
}
88
#[\Since('8.1')]
9+
#[\Until('8.3')]
910
function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0) : bool
1011
{
12+
}
13+
#[\Since('8.3')]
14+
function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0) : true
15+
{
1116
}

stubs/ext/imap/imap_undelete.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ function imap_undelete($imap, string $message_nums, int $flags = 0) : bool
88
{
99
}
1010
#[\Since('8.1')]
11+
#[\Until('8.3')]
1112
function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags = 0) : bool
1213
{
14+
}
15+
#[\Since('8.3')]
16+
function imap_undelete(\IMAP\Connection $imap, string $message_nums, int $flags = 0) : true
17+
{
1318
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?php
22

33
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
4+
#[\Until('8.3')]
45
function datefmt_set_timezone(\IntlDateFormatter $formatter, $timezone) : ?bool
56
{
7+
}
8+
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
9+
#[\Since('8.3')]
10+
function datefmt_set_timezone(\IntlDateFormatter $formatter, $timezone) : bool
11+
{
612
}

stubs/ext/intl/intlcal_clear.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
#[\Until('8.3')]
34
function intlcal_clear(\IntlCalendar $calendar, ?int $field = null) : bool
45
{
6+
}
7+
#[\Since('8.3')]
8+
function intlcal_clear(\IntlCalendar $calendar, ?int $field = null) : true
9+
{
510
}

stubs/ext/intl/intlcal_set.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
#[\Until('8.3')]
34
function intlcal_set(\IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) : bool
45
{
6+
}
7+
#[\Since('8.3')]
8+
function intlcal_set(\IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) : true
9+
{
510
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
#[\Until('8.3')]
34
function intlcal_set_first_day_of_week(\IntlCalendar $calendar, int $dayOfWeek) : bool
45
{
6+
}
7+
#[\Since('8.3')]
8+
function intlcal_set_first_day_of_week(\IntlCalendar $calendar, int $dayOfWeek) : true
9+
{
510
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
#[\Until('8.3')]
34
function intlcal_set_lenient(\IntlCalendar $calendar, bool $lenient) : bool
45
{
6+
}
7+
#[\Since('8.3')]
8+
function intlcal_set_lenient(\IntlCalendar $calendar, bool $lenient) : true
9+
{
510
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
#[\Until('8.3')]
34
function intlcal_set_minimal_days_in_first_week(\IntlCalendar $calendar, int $days) : bool
45
{
6+
}
7+
#[\Since('8.3')]
8+
function intlcal_set_minimal_days_in_first_week(\IntlCalendar $calendar, int $days) : true
9+
{
510
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
#[\Until('8.3')]
34
function intlcal_set_repeated_wall_time_option(\IntlCalendar $calendar, int $option) : bool
45
{
6+
}
7+
#[\Since('8.3')]
8+
function intlcal_set_repeated_wall_time_option(\IntlCalendar $calendar, int $option) : true
9+
{
510
}

0 commit comments

Comments
 (0)