From 7f7ad3739b0dac07d74be9c998a72fc2427fcba1 Mon Sep 17 00:00:00 2001 From: phpstan-bot Date: Sat, 31 Aug 2024 00:18:01 +0000 Subject: [PATCH] Update stubs --- stubs/ext/reflection/ReflectionClass.php | 38 +++++++++++++++++++++ stubs/ext/reflection/ReflectionProperty.php | 8 +++++ 2 files changed, 46 insertions(+) diff --git a/stubs/ext/reflection/ReflectionClass.php b/stubs/ext/reflection/ReflectionClass.php index b78a3e0..1bb6834 100644 --- a/stubs/ext/reflection/ReflectionClass.php +++ b/stubs/ext/reflection/ReflectionClass.php @@ -276,6 +276,38 @@ public function newInstanceWithoutConstructor() public function newInstanceArgs(array $args = []) { } + #[\Since('8.4')] + public function newLazyGhost(callable $initializer, int $options = 0): object + { + } + #[\Since('8.4')] + public function newLazyProxy(callable $factory, int $options = 0): object + { + } + #[\Since('8.4')] + public function resetAsLazyGhost(object $object, callable $factory, int $options = 0): void + { + } + #[\Since('8.4')] + public function resetAsLazyProxy(object $object, callable $factory, int $options = 0): void + { + } + #[\Since('8.4')] + public function initializeLazyObject(object $object): object + { + } + #[\Since('8.4')] + public function isUninitializedLazyObject(object $object): bool + { + } + #[\Since('8.4')] + public function markLazyObjectAsInitialized(object $object): object + { + } + #[\Since('8.4')] + public function getLazyInitializer(object $object): ?callable + { + } /** * @tentative-return-type * @return (ReflectionClass | false) @@ -423,4 +455,10 @@ public function getAttributes(?string $name = null, int $flags = 0): array /** @cvalue ZEND_ACC_READONLY_CLASS */ #[\Since('8.4')] public const int IS_READONLY = UNKNOWN; + /** @cvalue ZEND_LAZY_OBJECT_SKIP_INITIALIZATION_ON_SERIALIZE */ + #[\Since('8.4')] + public const int SKIP_INITIALIZATION_ON_SERIALIZE = UNKNOWN; + /** @cvalue ZEND_LAZY_OBJECT_SKIP_DESTRUCTOR */ + #[\Since('8.4')] + public const int SKIP_DESTRUCTOR = UNKNOWN; } \ No newline at end of file diff --git a/stubs/ext/reflection/ReflectionProperty.php b/stubs/ext/reflection/ReflectionProperty.php index 85f7015..351067c 100644 --- a/stubs/ext/reflection/ReflectionProperty.php +++ b/stubs/ext/reflection/ReflectionProperty.php @@ -47,6 +47,14 @@ public function getRawValue(object $object): mixed public function setRawValue(object $object, mixed $value): void { } + #[\Since('8.4')] + public function setRawValueWithoutLazyInitialization(object $object, mixed $value): void + { + } + #[\Since('8.4')] + public function skipLazyInitialization(object $object): void + { + } /** * @tentative-return-type * @return bool