diff --git a/packages/Testing/PHPUnit/AbstractRectorTestCase.php b/packages/Testing/PHPUnit/AbstractRectorTestCase.php index a367325d78f..61daf9503f8 100644 --- a/packages/Testing/PHPUnit/AbstractRectorTestCase.php +++ b/packages/Testing/PHPUnit/AbstractRectorTestCase.php @@ -8,7 +8,6 @@ use Iterator; use Nette\Utils\FileSystem; use Nette\Utils\Strings; -use PHPStan\Analyser\NodeScopeResolver; use PHPUnit\Framework\ExpectationFailedException; use Rector\Core\Application\ApplicationFileProcessor; use Rector\Core\Autoloading\AdditionalAutoloader; @@ -250,11 +249,6 @@ private function processFilePath(string $filePath): string { $this->dynamicSourceLocatorProvider->setFilePath($filePath); - // needed for PHPStan, because the analyzed file is just created in /temp - need for trait and similar deps - /** @var NodeScopeResolver $nodeScopeResolver */ - $nodeScopeResolver = $this->make(NodeScopeResolver::class); - $nodeScopeResolver->setAnalysedFiles([$filePath]); - /** @var ConfigurationFactory $configurationFactory */ $configurationFactory = $this->make(ConfigurationFactory::class); $configuration = $configurationFactory->createForTests([$filePath]);