Skip to content

Commit

Permalink
Remove extends tempalte check, to avoid missing scope bugs (#1096)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Oct 28, 2021
1 parent 849ed2f commit a5f8d52
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 79 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use Rector\Core\Stubs\DummyTraitClass;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\NodeTypeResolver\PHPStan\CollisionGuard\MixinGuard;
use Rector\NodeTypeResolver\PHPStan\CollisionGuard\TemplateExtendsGuard;
use Rector\NodeTypeResolver\PHPStan\Scope\NodeVisitor\RemoveDeepChainMethodCallNodeVisitor;
use Symplify\PackageBuilder\Reflection\PrivatesAccessor;
use Symplify\SmartFileSystem\SmartFileInfo;
Expand Down Expand Up @@ -63,7 +62,6 @@ public function __construct(
private PrivatesAccessor $privatesAccessor,
private RenamedClassesSourceLocator $renamedClassesSourceLocator,
private ParentAttributeSourceLocator $parentAttributeSourceLocator,
private TemplateExtendsGuard $templateExtendsGuard,
private MixinGuard $mixinGuard,
) {
}
Expand Down Expand Up @@ -114,12 +112,6 @@ public function processNodes(array $stmts, SmartFileInfo $smartFileInfo): array

$this->decoratePHPStanNodeScopeResolverWithRenamedClassSourceLocator($this->nodeScopeResolver);

// it needs to be checked early before `@mixin` check as
// ReflectionProvider already hang when check class with `@template-extends`
if ($this->templateExtendsGuard->containsTemplateExtendsPhpDoc($stmts, $smartFileInfo->getFilename())) {
return $stmts;
}

return $this->processNodesWithMixinHandling($smartFileInfo, $stmts, $scope, $nodeCallback);
}

Expand Down

0 comments on commit a5f8d52

Please sign in to comment.