Revert "Revert "use NewOptimizedDirectorySourceLocator""#4846
Revert "Revert "use NewOptimizedDirectorySourceLocator""#4846samsonasik merged 3 commits intomainfrom
Conversation
|
@TomasVotruba I am looking why new PHPStan 1.10.31 cause error: https://github.com/rectorphp/rector-src/actions/runs/5965825544/job/16184110293#step:10:19 |
|
Thanks 👍 Could you lock |
|
Ok, I will temporary lock phpstan to |
This reverts commit 07e36e3.
dd2aa10 to
f54fa71
Compare
This reverts commit f54fa71.
|
@TomasVotruba since the build is working ok now, let's try this 👍 |
|
|
||
| foreach ($this->filesByDirectory as $files) { | ||
| $sourceLocators[] = new OptimizedDirectorySourceLocator($this->fileNodesFetcher, $this->phpVersion, $files); | ||
| foreach ($this->directories as $directory) { |
There was a problem hiding this comment.
@TomasVotruba I tested this in CodeIgniter4 project, it make consistency 1 second faster.
Also make correct apply ::class tested at:
I will check more if this while improve performance, on complex files in target dir, eg contains .xml file, it read unnecessary files, since it fetch files under directory instead of read only listed files in the directory.
There was a problem hiding this comment.
@TomasVotruba I debugged, the OptimizedDirectorySourceLocatorFactory utilize PHPStan FileFinder that already only cover php extensions, so I guess it already cover only scan php files.
PHPStan\File\FileFinder #3115
fileExcluder: PHPStan\File\FileExcluder #3113
fileExtensions: array (1)
| 0 => 'php'so I think it already ok 👍
Reverts #4845