Skip to content

Commit

Permalink
Updated Rector to commit 70920b211391beb82fd05c269e6689e50b430988
Browse files Browse the repository at this point in the history
rectorphp/rector-src@70920b2 [PHPStan 2.1.3] Add ReflectionAttribute and ReflectionIntersectionType stub for PHPStan 2.1.3 (#6723)
  • Loading branch information
TomasVotruba committed Feb 8, 2025
1 parent 20f374a commit 767bb46
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '59d4bca60c0cc1efb8061524e0425454cb432bc8';
public const PACKAGE_VERSION = '70920b211391beb82fd05c269e6689e50b430988';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2025-02-07 12:56:52';
public const RELEASE_DATE = '2025-02-08 19:18:17';
/**
* @var int
*/
Expand Down
49 changes: 49 additions & 0 deletions stubs-rector/Internal/NativeClasses.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,42 @@ public function getTypes()
}
}

if (PHP_VERSION_ID < 80000 && ! class_exists('ReflectionAttribute', false)) {
class ReflectionAttribute
{

public const IS_INSTANCEOF = 2;

public function getName(): string
{
}

public function getTarget(): int
{
}

public function isRepeated(): bool
{
}

public function getArguments(): array
{
}

public function newInstance(): object
{
}

private function __clone()
{
}

private function __construct()
{
}
}
}

if (PHP_VERSION_ID < 80000 && ! class_exists('Attribute', false)) {
#[Attribute(Attribute::TARGET_CLASS)]
class Attribute
Expand Down Expand Up @@ -78,3 +114,16 @@ final class ReturnTypeWillChange
{
}
}

if (PHP_VERSION_ID < 80100 && ! class_exists('ReflectionIntersectionType', false)) {
class ReflectionIntersectionType extends ReflectionType
{

/** @return ReflectionType[] */
public function getTypes()
{
return [];
}

}
}
Loading

0 comments on commit 767bb46

Please sign in to comment.