Skip to content

Commit

Permalink
Update stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
phpstan-bot committed Jul 19, 2023
1 parent f8c515d commit 5b866d5
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Php8StubsMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2734,6 +2734,8 @@ public function __construct(int $phpVersionId)

$functions = \array_merge($functions, [
'json_validate' => 'stubs/ext/json/json_validate.php',
'ldap_connect_wallet' => 'stubs/ext/ldap/ldap_connect_wallet.php',
'ldap_exop_sync' => 'stubs/ext/ldap/ldap_exop_sync.php',
'mb_str_pad' => 'stubs/ext/mbstring/mb_str_pad.php',
'pg_enter_pipeline_mode' => 'stubs/ext/pgsql/pg_enter_pipeline_mode.php',
'pg_exit_pipeline_mode' => 'stubs/ext/pgsql/pg_exit_pipeline_mode.php',
Expand All @@ -2748,6 +2750,7 @@ public function __construct(int $phpVersionId)
'socket_atmark' => 'stubs/ext/sockets/socket_atmark.php',
'str_decrement' => 'stubs/ext/standard/str_decrement.php',
'str_increment' => 'stubs/ext/standard/str_increment.php',
'stream_context_set_options' => 'stubs/ext/standard/stream_context_set_options.php',
]);
}

Expand Down
4 changes: 4 additions & 0 deletions stubs/ext/date/DatePeriod.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

class DatePeriod implements \IteratorAggregate
{
#[\Since('8.3')]
public static function createFromISO8601String(string $specification, int $options = 0): static
{
}
/**
* @param DateTimeInterface|string $start
* @param DateInterval|int $interval
Expand Down
6 changes: 6 additions & 0 deletions stubs/ext/hash/hash_pbkdf2.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

#[\Until('8.1')]
function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string
{
}
/** @refcount 1 */
#[\Since('8.1')]
function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false, array $options = []): string
{
}
9 changes: 9 additions & 0 deletions stubs/ext/intl/calendar/IntlCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,15 @@ public function isSet(int $field)
public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN)
{
}
// TODO make return type void
#[\Since('8.3')]
public function setDate(int $year, int $month, int $dayOfMonth): void
{
}
#[\Since('8.3')]
public function setDateTime(int $year, int $month, int $dayOfMonth, int $hour, int $minute, ?int $second = null): void
{
}
/**
* @return bool
* @alias intlcal_set_first_day_of_week
Expand Down
8 changes: 8 additions & 0 deletions stubs/ext/intl/calendar/IntlGregorianCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

class IntlGregorianCalendar extends \IntlCalendar
{
#[\Since('8.3')]
public static function createFromDate(int $year, int $month, int $dayOfMonth): static
{
}
#[\Since('8.3')]
public static function createFromDateTime(int $year, int $month, int $dayOfMonth, int $hour, int $minute, ?int $second = null): static
{
}
/**
* @param DateTimeZone|IntlTimeZone|string|int|null $timezoneOrYear
* @param string|int|null $localeOrMonth
Expand Down
7 changes: 7 additions & 0 deletions stubs/ext/ldap/ldap_connect_wallet.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

#ifdef LDAP_API_FEATURE_X_OPENLDAP
#[\Since('8.3')]
function ldap_connect_wallet(?string $uri = null, string $wallet, #[\SensitiveParameter] string $password, int $auth_mode = GSLC_SSL_NO_AUTH): \LDAP\Connection|false
{
}
10 changes: 10 additions & 0 deletions stubs/ext/ldap/ldap_exop_sync.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

/**
* @param string $response_data
* @param string $response_oid
*/
#[\Since('8.3')]
function ldap_exop_sync(\LDAP\Connection $ldap, string $request_oid, ?string $request_data = null, ?array $controls = NULL, &$response_data = null, &$response_oid = null): \LDAP\Result|bool
{
}
9 changes: 9 additions & 0 deletions stubs/ext/pgsql/pg_fetch_result.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ function pg_fetch_result($result, $row, string|int $field = UNKNOWN): string|fal
* @refcount 1
*/
#[\Since('8.1')]
#[\Until('8.3')]
function pg_fetch_result(\PgSql\Result $result, $row, string|int $field = UNKNOWN): string|false|null
{
}
/**
* @param string|int|null $row
* @refcount 1
*/
#[\Since('8.3')]
function pg_fetch_result(\PgSql\Result $result, $row, string|int $field = UNKNOWN): string|false|null
{
}
6 changes: 6 additions & 0 deletions stubs/ext/pgsql/pg_field_is_null.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ function pg_field_is_null($result, $row, string|int $field = UNKNOWN): int|false
}
/** @param string|int $row */
#[\Since('8.1')]
#[\Until('8.3')]
function pg_field_is_null(\PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false
{
}
/** @param string|int|null $row */
#[\Since('8.3')]
function pg_field_is_null(\PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false
{
}
6 changes: 6 additions & 0 deletions stubs/ext/pgsql/pg_field_prtlen.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ function pg_field_prtlen($result, $row, string|int $field = UNKNOWN): int|false
}
/** @param string|int $row */
#[\Since('8.1')]
#[\Until('8.3')]
function pg_field_prtlen(\PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false
{
}
/** @param string|int|null $row */
#[\Since('8.3')]
function pg_field_prtlen(\PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false
{
}
4 changes: 4 additions & 0 deletions stubs/ext/reflection/ReflectionMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ class ReflectionMethod extends \ReflectionFunctionAbstract
public function __construct(object|string $objectOrMethod, ?string $method = null)
{
}
#[\Since('8.3')]
public static function createFromMethodName(string $method): static
{
}
public function __toString(): string
{
}
Expand Down
7 changes: 7 additions & 0 deletions stubs/ext/standard/stream_context_set_options.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

/** @param resource $context */
#[\Since('8.3')]
function stream_context_set_options($context, array $options): bool
{
}

0 comments on commit 5b866d5

Please sign in to comment.