Skip to content

Commit

Permalink
Update stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
phpstan-bot committed Aug 31, 2024
1 parent 9bd59d7 commit 7f7ad37
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
38 changes: 38 additions & 0 deletions stubs/ext/reflection/ReflectionClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
8 changes: 8 additions & 0 deletions stubs/ext/reflection/ReflectionProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f7ad37

Please sign in to comment.