Skip to content

Commit b3a6da9

Browse files
committed
Update stubs
1 parent d451996 commit b3a6da9

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

Diff for: Php8StubsMap.php

+1
Original file line numberDiff line numberDiff line change
@@ -2833,6 +2833,7 @@ public function __construct(int $phpVersionId)
28332833
'pg_socket_poll' => 'stubs/ext/pgsql/pg_socket_poll.php',
28342834
'propertyhooktype' => 'stubs/ext/reflection/PropertyHookType.php',
28352835
'request_parse_body' => 'stubs/ext/standard/request_parse_body.php',
2836+
'roundingmode' => 'stubs/ext/standard/RoundingMode.php',
28362837
'sodium_crypto_aead_aegis128l_decrypt' => 'stubs/ext/sodium/sodium_crypto_aead_aegis128l_decrypt.php',
28372838
'sodium_crypto_aead_aegis128l_encrypt' => 'stubs/ext/sodium/sodium_crypto_aead_aegis128l_encrypt.php',
28382839
'sodium_crypto_aead_aegis128l_keygen' => 'stubs/ext/sodium/sodium_crypto_aead_aegis128l_keygen.php',

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
/** @refcount 1 */
44
#[\Since('8.4')]
5-
function bcround(string $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): string
5+
function bcround(string $num, int $precision = 0, \RoundingMode $mode = RoundingMode::HalfAwayFromZero): string
66
{
77
}

Diff for: stubs/ext/pdo_firebird/Pdo/Firebird.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class Firebird extends \PDO
1515
public const int ATTR_TIME_FORMAT = UNKNOWN;
1616
/** @cvalue PDO_FB_ATTR_TIMESTAMP_FORMAT */
1717
public const int ATTR_TIMESTAMP_FORMAT = UNKNOWN;
18-
/** @cvalue PDO_FB_ATTR_API_VERSION */
19-
public const int ATTR_API_VERSION = UNKNOWN;
2018
/** @cvalue PDO_FB_TRANSACTION_ISOLATION_LEVEL */
2119
public const int TRANSACTION_ISOLATION_LEVEL = UNKNOWN;
2220
/** @cvalue PDO_FB_READ_COMMITTED */
@@ -27,4 +25,7 @@ class Firebird extends \PDO
2725
public const int SERIALIZABLE = UNKNOWN;
2826
/** @cvalue PDO_FB_WRITABLE_TRANSACTION */
2927
public const int WRITABLE_TRANSACTION = UNKNOWN;
28+
public static function getApiVersion(): int
29+
{
30+
}
3031
}

Diff for: stubs/ext/standard/RoundingMode.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
#[\Since('8.4')]
4+
enum RoundingMode
5+
{
6+
case HalfAwayFromZero;
7+
case HalfTowardsZero;
8+
case HalfEven;
9+
case HalfOdd;
10+
case TowardsZero;
11+
case AwayFromZero;
12+
case NegativeInfinity;
13+
case PositiveInfinity;
14+
}

Diff for: stubs/ext/standard/round.php

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

3+
#[\Until('8.4')]
34
function round(int|float $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): float
45
{
6+
}
7+
/** @compile-time-eval */
8+
#[\Since('8.4')]
9+
function round(int|float $num, int $precision = 0, int|\RoundingMode $mode = RoundingMode::HalfAwayFromZero): float
10+
{
511
}

0 commit comments

Comments
 (0)