intelephense
1.14.41.16.1
lib/stub/Core/Core_c.phplib/stub/Core/Core_c.php+40−7
Index: package/lib/stub/Core/Core_c.php
===================================================================
--- package/lib/stub/Core/Core_c.php
+++ package/lib/stub/Core/Core_c.php
@@ -273,9 +273,12 @@
* @link https://php.net/manual/en/class.exception.php
*/
class Exception implements Throwable
{
- /** The error message */
+ /**
+ * The error message
+ * @var string
+ */
protected $message;
/** The error code */
protected $code;
@@ -604,9 +607,9 @@
* @param int $code [optional] The Exception code.
* @param int $severity [optional] The severity level of the exception.
* @param string $filename [optional] The filename where the exception is thrown.
* @param int $line [optional] The line number where the exception is thrown.
- * @param Exception $previous [optional] The previous exception used for the exception chaining.
+ * @param Throwable $previous [optional] The previous exception used for the exception chaining.
*/
#[Pure]
public function __construct(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $message = "",
@@ -667,13 +670,15 @@
/**
* This method is a static version of Closure::bindTo().
* See the documentation of that method for more information.
* @link https://secure.php.net/manual/en/closure.bind.php
+ * @template T of object
* @param Closure $closure The anonymous functions to bind.
- * @param object|null $newThis The object to which the given anonymous function should be bound, or NULL for the closure to be unbound.
+ * @param T|null $newThis The object to which the given anonymous function should be bound, or NULL for the closure to be unbound.
* @param object|class-string|null $newScope The class scope to which associate the closure is to be associated, or 'static' to keep the current one.
* If an object is given, the type of the object will be used instead.
* This determines the visibility of protected and private methods of the bound object.
+ * @param-closure-this T $newThis
* @return Closure|null Returns the newly created Closure object or null on failure
*/
#[Pure]
public static function bind(Closure $closure, ?object $newThis, object|string|null $newScope = 'static'): ?Closure {}
@@ -693,8 +698,13 @@
* @return Closure
* @since 7.1
*/
public static function fromCallable(callable $callback): Closure {}
+
+ /**
+ * @since 8.5
+ */
+ public static function getCurrent(): Closure {}
}
/**
* Classes implementing <b>Countable</b> can be used with the
@@ -876,11 +886,17 @@
*/
public const TARGET_PARAMETER = 32;
/**
+ * Marks that attribute declaration is allowed only in constants.
+ * @since 8.5
+ */
+ public const TARGET_CONSTANT = 32;
+
+ /**
* Marks that attribute declaration is allowed anywhere.
*/
- public const TARGET_ALL = 63;
+ public const TARGET_ALL = 127;
/**
* Notes that an attribute declaration in the same place is
* allowed multiple times.
@@ -890,9 +906,9 @@
/**
* @param int $flags A value in the form of a bitmask indicating the places
* where attributes can be defined.
*/
- public function __construct(#[ExpectedValues(flagsFromClass: Attribute::class)] int $flags = self::TARGET_ALL) {}
+ public function __construct(#[ExpectedValues(flagsFromClass: Attribute::class)] int $flags = Attribute::TARGET_ALL) {}
}
/**
* @since 8.0
@@ -1114,21 +1130,38 @@
/**
* @since 8.3
*/
-#[Attribute(Attribute::TARGET_METHOD)]
+#[Attribute(Attribute::TARGET_METHOD|Attribute::TARGET_PROPERTY)]
final class Override
{
public function __construct() {}
}
/**
* @since 8.4
*/
-#[Attribute(Attribute::TARGET_METHOD|Attribute::TARGET_FUNCTION|Attribute::TARGET_CLASS_CONSTANT)]
+#[Attribute(Attribute::TARGET_METHOD|Attribute::TARGET_FUNCTION|Attribute::TARGET_CLASS_CONSTANT|Attribute::TARGET_CONSTANT|Attribute::TARGET_CLASS)]
final class Deprecated
{
public readonly ?string $message;
public readonly ?string $since;
public function __construct(?string $message = null, ?string $since = null) {}
}
+
+/**
+ * @since 8.5
+ */
+#[Attribute(Attribute::TARGET_METHOD|Attribute::TARGET_FUNCTION)]
+final class NoDiscard
+{
+ public readonly ?string $message;
+
+ public function __construct(?string $message = null) {}
+}
+
+/**
+ * @since 8.5
+ */
+#[Attribute(Attribute::TARGET_ALL)]
+final class DelayedTargetValidation {}