-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[parallel] Let WorkerRunner know about paths, so PHPStan and Rector can handle static reflection over them #1629
Conversation
6c766b8
to
b831848
Compare
if ($matchedExpectedOutput === false) { | ||
echo "\nEXPECTED:\n"; | ||
var_dump($expectedOutput); | ||
echo "\nACTUAL:\n"; | ||
var_dump($output); | ||
exit(1); | ||
} | ||
// print color diff, to make easy find the differences | ||
$consoleDiffer = new ConsoleDiffer(new Differ(), new ColorConsoleDiffFormatter()); | ||
$diff = $consoleDiffer->diff($output, $expectedOutput); | ||
$symfonyStyle->writeln($diff); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) { | ||
} | ||
|
||
public function run(Encoder $encoder, Decoder $decoder, Configuration $configuration): void | ||
{ | ||
$this->dynamicSourceLocatorDecorator->addPaths($configuration->getPaths()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 1st missing part was paths here. That's how we can tell Rector and PHPStan to use static reflection on specific directories
|
||
// 1. allow PHPStan to work with static reflection on provided files | ||
$this->nodeScopeResolver->setAnalysedFiles($filePaths); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 2nd missing part was here. Now scope analyzer can work with provided paths.
b831848
to
678232e
Compare
678232e
to
5233f22
Compare
@samsonasik Ready for review and merge 👍 |
@TomasVotruba let's give it a try and let's see if we can add more directory to list of downgrade parallel. |
Replaces #1613 (closes #1613)
Fixes rectorphp/rector#6903