Skip to content

Commit 87c8b96

Browse files
committed
Update stubs
1 parent 607bc9f commit 87c8b96

File tree

7 files changed

+65
-5
lines changed

7 files changed

+65
-5
lines changed

stubs/ext/fileinfo/finfo_close.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function finfo_close($finfo): bool
1212
function finfo_close(\finfo $finfo): bool
1313
{
1414
}
15+
#[\Deprecated(since: '8.5', message: 'as finfo objects are freed automatically')]
1516
#[\Since('8.5')]
1617
function finfo_close(\finfo $finfo): true
1718
{

stubs/ext/intl/calendar/IntlCalendar.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,22 @@ private function __construct()
280280
{
281281
}
282282
/**
283-
* @param (IntlTimeZone | DateTimeZone | string | null) $timezone
284283
* @tentative-return-type
285284
* @alias intlcal_create_instance
286285
* @return (IntlCalendar | null)
287286
*/
287+
#[\Until('8.5')]
288288
public static function createInstance($timezone = null, ?string $locale = null)
289289
{
290290
}
291+
/**
292+
* @tentative-return-type
293+
* @alias intlcal_create_instance
294+
*/
295+
#[\Since('8.5')]
296+
public static function createInstance(IntlTimeZone|DateTimeZone|string|null $timezone = null, ?string $locale = null)
297+
{
298+
}
291299
/**
292300
* @tentative-return-type
293301
* @alias intlcal_equals
@@ -634,14 +642,20 @@ public function setTime(float $timestamp)
634642
{
635643
}
636644
/**
637-
* @param (IntlTimeZone | DateTimeZone | string | null) $timezone
638645
* @tentative-return-type
639-
* @alias intlcal_set_time_zone
640646
* @return bool
641647
*/
648+
#[\Until('8.5')]
642649
public function setTimeZone($timezone)
643650
{
644651
}
652+
/**
653+
* @tentative-return-type
654+
*/
655+
#[\Since('8.5')]
656+
public function setTimeZone(IntlTimeZone|DateTimeZone|string|null $timezone)
657+
{
658+
}
645659
/**
646660
* @tentative-return-type
647661
* @alias intlcal_to_date_time

stubs/ext/intl/datefmt_create.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ function datefmt_create(?string $locale, int $dateType, int $timeType, $timezone
99
/* dateformat */
1010
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
1111
#[\Since('8.1')]
12+
#[\Until('8.5')]
1213
function datefmt_create(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, $timezone = null, \IntlCalendar|int|null $calendar = null, ?string $pattern = null): ?\IntlDateFormatter
1314
{
15+
}
16+
/* dateformat */
17+
#[\Since('8.5')]
18+
function datefmt_create(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, \IntlTimeZone|\DateTimeZone|string|null $timezone = null, \IntlCalendar|int|null $calendar = null, ?string $pattern = null): ?\IntlDateFormatter
19+
{
1420
}

stubs/ext/intl/datefmt_set_timezone.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ function datefmt_set_timezone(\IntlDateFormatter $formatter, $timezone): ?bool
77
}
88
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
99
#[\Since('8.3')]
10+
#[\Until('8.5')]
1011
function datefmt_set_timezone(\IntlDateFormatter $formatter, $timezone): bool
1112
{
13+
}
14+
#[\Since('8.5')]
15+
function datefmt_set_timezone(\IntlDateFormatter $formatter, \IntlTimeZone|\DateTimeZone|string|null $timezone): bool
16+
{
1217
}

stubs/ext/intl/dateformat/IntlDateFormatter.php

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,35 @@ public static function create(?string $locale, int $dateType, int $timeType, $ti
103103
* @param IntlCalendar|int|null $calendar
104104
*/
105105
#[\Since('8.1')]
106+
#[\Until('8.5')]
106107
public function __construct(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, $timezone = null, $calendar = null, ?string $pattern = null)
107108
{
108109
}
110+
/**
111+
* @param IntlCalendar|int|null $calendar
112+
*/
113+
#[\Since('8.5')]
114+
public function __construct(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, IntlTimeZone|DateTimeZone|string|null $timezone = null, $calendar = null, ?string $pattern = null)
115+
{
116+
}
109117
/**
110118
* @param IntlTimeZone|DateTimeZone|string|null $timezone
111119
* @tentative-return-type
112120
* @alias datefmt_create
113121
*/
114122
#[\Since('8.1')]
123+
#[\Until('8.5')]
115124
public static function create(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, $timezone = null, IntlCalendar|int|null $calendar = null, ?string $pattern = null)
116125
{
117126
}
127+
/**
128+
* @tentative-return-type
129+
* @alias datefmt_create
130+
*/
131+
#[\Since('8.5')]
132+
public static function create(?string $locale, int $dateType = IntlDateFormatter::FULL, int $timeType = IntlDateFormatter::FULL, IntlTimeZone|DateTimeZone|string|null $timezone = null, IntlCalendar|int|null $calendar = null, ?string $pattern = null)
133+
{
134+
}
118135
/**
119136
* @tentative-return-type
120137
* @alias datefmt_get_datetype
@@ -172,14 +189,20 @@ public function getTimeZone()
172189
{
173190
}
174191
/**
175-
* @param (IntlTimeZone | DateTimeZone | string | null) $timezone
176192
* @tentative-return-type
177-
* @alias datefmt_set_timezone
178193
* @return (bool | null)
179194
*/
195+
#[\Until('8.5')]
180196
public function setTimeZone($timezone)
181197
{
182198
}
199+
/**
200+
* @tentative-return-type
201+
*/
202+
#[\Since('8.5')]
203+
public function setTimeZone(IntlTimeZone|DateTimeZone|string|null $timezone)
204+
{
205+
}
183206
/**
184207
* @tentative-return-type
185208
* @alias datefmt_set_pattern

stubs/ext/intl/intlcal_create_instance.php

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

33
/* calendar */
44
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
5+
#[\Until('8.5')]
56
function intlcal_create_instance($timezone = null, ?string $locale = null): ?\IntlCalendar
67
{
8+
}
9+
/* calendar */
10+
#[\Since('8.5')]
11+
function intlcal_create_instance(\IntlTimeZone|\DateTimeZone|string|null $timezone = null, ?string $locale = null): ?\IntlCalendar
12+
{
713
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?php
22

33
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
4+
#[\Until('8.5')]
45
function intlcal_set_time_zone(\IntlCalendar $calendar, $timezone): bool
56
{
7+
}
8+
#[\Since('8.5')]
9+
function intlcal_set_time_zone(\IntlCalendar $calendar, \IntlTimeZone|\DateTimeZone|string|null $timezone): bool
10+
{
611
}

0 commit comments

Comments
 (0)