Skip to content

Commit a09e829

Browse files
committed
Update stubs
1 parent 8792897 commit a09e829

File tree

79 files changed

+809
-14
lines changed

Some content is hidden

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

79 files changed

+809
-14
lines changed

stubs/ext/curl/curl_close.php

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

3+
#[\Until('8.5')]
4+
function curl_close(\CurlHandle $handle): void
5+
{
6+
}
7+
#[\Deprecated(since: '8.5', message: "as it has no effect since PHP 8.0")]
8+
#[\Since('8.5')]
39
function curl_close(\CurlHandle $handle): void
410
{
511
}

stubs/ext/curl/curl_share_close.php

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

3+
#[\Until('8.5')]
4+
function curl_share_close(\CurlShareHandle $share_handle): void
5+
{
6+
}
7+
#[\Deprecated(since: '8.5', message: "as it has no effect since PHP 8.0")]
8+
#[\Since('8.5')]
39
function curl_share_close(\CurlShareHandle $share_handle): void
410
{
511
}

stubs/ext/date/DateTimeImmutable.php

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,59 +98,121 @@ public function diff(DateTimeInterface $targetObject, bool $absolute = false)
9898
* @tentative-return-type
9999
* @return (DateTimeImmutable | false)
100100
*/
101+
#[\Until('8.5')]
102+
public function modify(string $modifier)
103+
{
104+
}
105+
/** @tentative-return-type */
106+
#[\NoDiscard(message: "as DateTimeImmutable::modify() does not modify the object itself")]
107+
#[\Since('8.5')]
101108
public function modify(string $modifier)
102109
{
103110
}
104111
/**
105112
* @tentative-return-type
106113
* @return DateTimeImmutable
107114
*/
115+
#[\Until('8.5')]
116+
public function add(DateInterval $interval)
117+
{
118+
}
119+
/** @tentative-return-type */
120+
#[\NoDiscard(message: "as DateTimeImmutable::add() does not modify the object itself")]
121+
#[\Since('8.5')]
108122
public function add(DateInterval $interval)
109123
{
110124
}
111125
/**
112126
* @tentative-return-type
113127
* @return DateTimeImmutable
114128
*/
129+
#[\Until('8.5')]
130+
public function sub(DateInterval $interval)
131+
{
132+
}
133+
/** @tentative-return-type */
134+
#[\NoDiscard(message: "as DateTimeImmutable::sub() does not modify the object itself")]
135+
#[\Since('8.5')]
115136
public function sub(DateInterval $interval)
116137
{
117138
}
118139
/**
119140
* @tentative-return-type
120141
* @return DateTimeImmutable
121142
*/
143+
#[\Until('8.5')]
144+
public function setTimezone(DateTimeZone $timezone)
145+
{
146+
}
147+
/** @tentative-return-type */
148+
#[\NoDiscard(message: "as DateTimeImmutable::setTimezone() does not modify the object itself")]
149+
#[\Since('8.5')]
122150
public function setTimezone(DateTimeZone $timezone)
123151
{
124152
}
125153
/**
126154
* @tentative-return-type
127155
* @return DateTimeImmutable
128156
*/
157+
#[\Until('8.5')]
158+
public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0)
159+
{
160+
}
161+
/** @tentative-return-type */
162+
#[\NoDiscard(message: "as DateTimeImmutable::setTime() does not modify the object itself")]
163+
#[\Since('8.5')]
129164
public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0)
130165
{
131166
}
132167
/**
133168
* @tentative-return-type
134169
* @return DateTimeImmutable
135170
*/
171+
#[\Until('8.5')]
172+
public function setDate(int $year, int $month, int $day)
173+
{
174+
}
175+
/** @tentative-return-type */
176+
#[\NoDiscard(message: "as DateTimeImmutable::setDate() does not modify the object itself")]
177+
#[\Since('8.5')]
136178
public function setDate(int $year, int $month, int $day)
137179
{
138180
}
139181
/**
140182
* @tentative-return-type
141183
* @return DateTimeImmutable
142184
*/
185+
#[\Until('8.5')]
186+
public function setISODate(int $year, int $week, int $dayOfWeek = 1)
187+
{
188+
}
189+
/** @tentative-return-type */
190+
#[\NoDiscard(message: "as DateTimeImmutable::setISODate() does not modify the object itself")]
191+
#[\Since('8.5')]
143192
public function setISODate(int $year, int $week, int $dayOfWeek = 1)
144193
{
145194
}
146195
/**
147196
* @tentative-return-type
148197
* @return DateTimeImmutable
149198
*/
199+
#[\Until('8.5')]
200+
public function setTimestamp(int $timestamp)
201+
{
202+
}
203+
/** @tentative-return-type */
204+
#[\NoDiscard(message: "as DateTimeImmutable::setTimestamp() does not modify the object itself")]
205+
#[\Since('8.5')]
150206
public function setTimestamp(int $timestamp)
151207
{
152208
}
153209
#[\Since('8.4')]
210+
#[\Until('8.5')]
211+
public function setMicrosecond(int $microsecond): static
212+
{
213+
}
214+
#[\NoDiscard(message: "as DateTimeImmutable::setMicrosecond() does not modify the object itself")]
215+
#[\Since('8.5')]
154216
public function setMicrosecond(int $microsecond): static
155217
{
156218
}

stubs/ext/date/date_sunrise.php

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

3+
#[\Until('8.4')]
4+
function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null): string|int|float|false
5+
{
6+
}
7+
/**
8+
* @refcount 1
9+
*/
10+
#[\Deprecated(since: '8.1', message: 'use date_sun_info() instead')]
11+
#[\Since('8.4')]
312
function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null): string|int|float|false
413
{
514
}

stubs/ext/date/date_sunset.php

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

3+
#[\Until('8.4')]
4+
function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null): string|int|float|false
5+
{
6+
}
7+
/**
8+
* @refcount 1
9+
*/
10+
#[\Deprecated(since: '8.1', message: 'use date_sun_info() instead')]
11+
#[\Since('8.4')]
312
function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null): string|int|float|false
413
{
514
}

stubs/ext/date/gmstrftime.php

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

3+
#[\Until('8.4')]
4+
function gmstrftime(string $format, ?int $timestamp = null): string|false
5+
{
6+
}
7+
/**
8+
* @refcount 1
9+
*/
10+
#[\Deprecated(since: '8.1', message: 'use IntlDateFormatter::format() instead')]
11+
#[\Since('8.4')]
312
function gmstrftime(string $format, ?int $timestamp = null): string|false
413
{
514
}

stubs/ext/date/strftime.php

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

3+
#[\Until('8.4')]
4+
function strftime(string $format, ?int $timestamp = null): string|false
5+
{
6+
}
7+
/**
8+
* @refcount 1
9+
*/
10+
#[\Deprecated(since: '8.1', message: 'use IntlDateFormatter::format() instead')]
11+
#[\Since('8.4')]
312
function strftime(string $format, ?int $timestamp = null): string|false
413
{
514
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?php
22

33
/** @deprecated */
4+
#[\Until('8.4')]
5+
function enchant_broker_free(\EnchantBroker $broker): bool
6+
{
7+
}
8+
#[\Deprecated(since: '8.0', message: 'as EnchantBroker objects are freed automatically')]
9+
#[\Since('8.4')]
410
function enchant_broker_free(\EnchantBroker $broker): bool
511
{
612
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?php
22

33
/** @deprecated */
4+
#[\Until('8.4')]
5+
function enchant_broker_free_dict(\EnchantDictionary $dictionary): bool
6+
{
7+
}
8+
#[\Deprecated(since: '8.0', message: 'as EnchantDictionary objects are freed automatically')]
9+
#[\Since('8.4')]
410
function enchant_broker_free_dict(\EnchantDictionary $dictionary): bool
511
{
612
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<?php
22

33
/** @deprecated */
4+
#[\Until('8.4')]
5+
function enchant_broker_get_dict_path(\EnchantBroker $broker, int $type): string|false
6+
{
7+
}
8+
#[\Deprecated(since: '8.0')]
9+
#[\Since('8.4')]
410
function enchant_broker_get_dict_path(\EnchantBroker $broker, int $type): string|false
511
{
612
}

0 commit comments

Comments
 (0)