Skip to content

Commit

Permalink
Updated Rector to commit 6a5f6c53f3637b23b4488cab81ec90a0d1bef053
Browse files Browse the repository at this point in the history
rectorphp/rector-src@6a5f6c5 [TypeDeclaration] Handle crash on interface Mixin on ReturnTypeFromStrictConstantReturnRector (#5884)
  • Loading branch information
TomasVotruba committed May 16, 2024
1 parent 3c1e41f commit 6cf7059
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 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 = '6bd2b871c4e9741928fb48df3ca8e899be42be81';
public const PACKAGE_VERSION = '6a5f6c53f3637b23b4488cab81ec90a0d1bef053';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-05-15 09:15:53';
public const RELEASE_DATE = '2024-05-16 18:42:05';
/**
* @var int
*/
Expand Down
15 changes: 13 additions & 2 deletions src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ final class PHPStanNodeScopeResolver
* @var bool
*/
private $hasUnreachableStatementNode = \false;
/**
* @var string
*/
private const PHPSTAN_INTERNAL_ERROR_MESSAGE = 'Internal error.';
/**
* @param ScopeResolverNodeVisitorInterface[] $nodeVisitors
*/
Expand Down Expand Up @@ -233,7 +237,7 @@ private function nodeScopeResolverProcessNodes(array $stmts, MutatingScope $muta
try {
$this->nodeScopeResolver->processNodes($stmts, $mutatingScope, $nodeCallback);
} catch (Throwable $throwable) {
if ($throwable->getMessage() !== 'Internal error.') {
if ($throwable->getMessage() !== self::PHPSTAN_INTERNAL_ERROR_MESSAGE) {
throw $throwable;
}
}
Expand Down Expand Up @@ -362,7 +366,14 @@ private function resolveClassOrInterfaceScope($classLike, MutatingScope $mutatin
}
$context = $this->privatesAccessor->getPrivateProperty($mutatingScope, 'context');
$this->privatesAccessor->setPrivateProperty($context, 'classReflection', null);
return $mutatingScope->enterClass($classReflection);
try {
return $mutatingScope->enterClass($classReflection);
} catch (Throwable $throwable) {
if ($throwable->getMessage() !== self::PHPSTAN_INTERNAL_ERROR_MESSAGE) {
throw $throwable;
}
return $mutatingScope;
}
}
/**
* @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_|\PhpParser\Node\Stmt\Trait_|\PhpParser\Node\Stmt\Enum_ $classLike
Expand Down
2 changes: 1 addition & 1 deletion vendor/scoper-autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Restore the backup and ensure the excluded files are properly marked as loaded
$GLOBALS['__composer_autoload_files'] = \array_merge(
$existingComposerAutoloadFiles,
\array_fill_keys(['0e6d7bf4a5811bfa5cf40c5ccd6fae6a', '5928a00fa978807cf85d90ec3f4b0147'], true)
\array_fill_keys(['5928a00fa978807cf85d90ec3f4b0147', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a'], true)
);

return $loader;
Expand Down

0 comments on commit 6cf7059

Please sign in to comment.