Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

massive update stubs for PHP 8.4 and fix for old versions #1667

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Core/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,8 @@ function get_class_methods(object|string $object_or_class): array {}
* @return bool This function returns false if wrong <i>error_type</i> is
* specified, true otherwise.
*/
function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool {}
#[LanguageLevelTypeAware(['8.4' => 'true'], default: 'bool')]
function trigger_error(string $message, int $error_level = E_USER_NOTICE) {}

/**
* Alias of <b>trigger_error</b>
Expand All @@ -645,7 +646,8 @@ function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool
* @return bool This function returns false if wrong <i>error_type</i> is
* specified, true otherwise.
*/
function user_error(string $message, int $error_level = E_USER_NOTICE): bool {}
#[LanguageLevelTypeAware(['8.4' => 'true'], default: 'bool')]
function user_error(string $message, int $error_level = E_USER_NOTICE) {}

/**
* Sets a user-defined error handler function
Expand Down
17 changes: 17 additions & 0 deletions Core/Core_c.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,11 @@ class DivisionByZeroError extends ArithmeticError {}
*/
class UnhandledMatchError extends Error {}

/**
* @since 8.4
*/
class RequestParseBodyException extends Exception {}

/**
* An Error Exception.
* @link https://php.net/manual/en/class.errorexception.php
Expand Down Expand Up @@ -1151,3 +1156,15 @@ final class Override
{
public function __construct() {}
}

/**
* @since 8.4
*/
#[Attribute(Attribute::TARGET_METHOD|Attribute::TARGET_FUNCTION|Attribute::TARGET_CLASS_CONSTANT)]
final class Deprecated
{
public readonly ?string $message;
public readonly ?string $since;

public function __construct(?string $message = null, ?string $since = null) {}
}
5 changes: 5 additions & 0 deletions Core/Core_d.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@
/** @link https://php.net/manual/en/outcontrol.constants.php */
define('PHP_OUTPUT_HANDLER_DISABLED', 8192);

/**
* @since 8.4
*/
const PHP_SBINDIR = '/usr/local/sbin', PHP_OUTPUT_HANDLER_PROCESSED = 16384;

/**
* Specifies where the manpages were installed into.
* @since 5.3.7
Expand Down
Loading
Loading