diff --git a/src/Psalm/Codebase.php b/src/Psalm/Codebase.php index f97f633ff..80a9f765d 100644 --- a/src/Psalm/Codebase.php +++ b/src/Psalm/Codebase.php @@ -13,7 +13,7 @@ use Psalm\Internal\Provider\FileStorageProvider; use Psalm\Internal\Provider\Providers; use Psalm\Internal\Provider\StatementsProvider; use Psalm\Progress\Progress; -use Psalm\Progress\DefaultProgress; +use Psalm\Progress\VoidProgress; use Psalm\Storage\ClassLikeStorage; use Psalm\Storage\FileStorage; use Psalm\Storage\FunctionLikeStorage; @@ -198,7 +198,7 @@ class Codebase Progress $progress = null ) { if ($progress === null) { - $progress = new DefaultProgress(); + $progress = new VoidProgress(); } $this->config = $config; diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index 367914c9b..464a1bf6a 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -18,7 +18,7 @@ use Psalm\Internal\Scanner\FileScanner; use Psalm\Plugin\Hook; use Psalm\PluginRegistrationSocket; use Psalm\Progress\Progress; -use Psalm\Progress\DefaultProgress; +use Psalm\Progress\VoidProgress; use SimpleXMLElement; class Config @@ -1441,7 +1441,7 @@ class Config public function visitStubFiles(Codebase $codebase, Progress $progress = null) { if ($progress === null) { - $progress = new DefaultProgress(); + $progress = new VoidProgress(); } $codebase->register_stub_files = true; @@ -1554,7 +1554,7 @@ class Config public function visitComposerAutoloadFiles(ProjectAnalyzer $project_analyzer, Progress $progress = null) { if ($progress === null) { - $progress = new DefaultProgress(); + $progress = new VoidProgress(); } $this->collectPredefinedConstants(); diff --git a/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php b/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php index c818a2985..090c6b113 100644 --- a/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php @@ -11,7 +11,7 @@ use Psalm\Internal\Provider\FileReferenceProvider; use Psalm\Internal\Provider\ParserCacheProvider; use Psalm\Internal\Provider\Providers; use Psalm\Progress\Progress; -use Psalm\Progress\DefaultProgress; +use Psalm\Progress\VoidProgress; use Psalm\Type; /** @@ -176,7 +176,7 @@ class ProjectAnalyzer $show_snippet = true ) { if ($progress === null) { - $progress = new DefaultProgress(); + $progress = new VoidProgress(); } $this->parser_cache_provider = $providers->parser_cache_provider; diff --git a/src/Psalm/Internal/Codebase/ClassLikes.php b/src/Psalm/Internal/Codebase/ClassLikes.php index 8f1be757d..073f52aa9 100644 --- a/src/Psalm/Internal/Codebase/ClassLikes.php +++ b/src/Psalm/Internal/Codebase/ClassLikes.php @@ -18,7 +18,7 @@ use Psalm\IssueBuffer; use Psalm\Internal\Provider\ClassLikeStorageProvider; use Psalm\Internal\Provider\FileReferenceProvider; use Psalm\Progress\Progress; -use Psalm\Progress\DefaultProgress; +use Psalm\Progress\VoidProgress; use Psalm\Storage\ClassLikeStorage; use Psalm\Type; use ReflectionProperty; @@ -670,7 +670,7 @@ class ClassLikes public function checkClassReferences(Methods $methods, Progress $progress = null) { if ($progress === null) { - $progress = new DefaultProgress(); + $progress = new VoidProgress(); } $progress->debug('Checking class references' . PHP_EOL); diff --git a/src/Psalm/Internal/Provider/StatementsProvider.php b/src/Psalm/Internal/Provider/StatementsProvider.php index be93907d2..2b3acfe8e 100644 --- a/src/Psalm/Internal/Provider/StatementsProvider.php +++ b/src/Psalm/Internal/Provider/StatementsProvider.php @@ -4,6 +4,7 @@ namespace Psalm\Internal\Provider; use PhpParser; use Psalm\Progress\Progress; use Psalm\Progress\DefaultProgress; +use Psalm\Progress\VoidProgress; /** * @internal @@ -74,7 +75,7 @@ class StatementsProvider public function getStatementsForFile($file_path, Progress $progress = null) { if ($progress === null) { - $progress = new DefaultProgress(); + $progress = new VoidProgress(); } $from_cache = false; diff --git a/src/Psalm/Internal/Scanner/FileScanner.php b/src/Psalm/Internal/Scanner/FileScanner.php index 5ff1b9e04..c5d5b231a 100644 --- a/src/Psalm/Internal/Scanner/FileScanner.php +++ b/src/Psalm/Internal/Scanner/FileScanner.php @@ -6,7 +6,7 @@ use PhpParser\NodeTraverser; use Psalm\Codebase; use Psalm\FileSource; use Psalm\Progress\Progress; -use Psalm\Progress\DefaultProgress; +use Psalm\Progress\VoidProgress; use Psalm\Storage\FileStorage; use Psalm\Internal\Visitor\ReflectorVisitor; @@ -54,7 +54,7 @@ class FileScanner implements FileSource Progress $progress = null ) { if ($progress === null) { - $progress = new DefaultProgress(); + $progress = new VoidProgress(); } if ((!$this->will_analyze || $file_storage->deep_scan) diff --git a/src/Psalm/Progress/VoidProgress.php b/src/Psalm/Progress/VoidProgress.php new file mode 100644 index 000000000..54bce3cad --- /dev/null +++ b/src/Psalm/Progress/VoidProgress.php @@ -0,0 +1,6 @@ +project_analyzer->setPhpVersion('7.3'); } diff --git a/tests/FileUpdates/CachedStorageTest.php b/tests/FileUpdates/CachedStorageTest.php index 833b0d0c3..14f3763bf 100644 --- a/tests/FileUpdates/CachedStorageTest.php +++ b/tests/FileUpdates/CachedStorageTest.php @@ -5,7 +5,6 @@ use Psalm\Internal\Analyzer\FileAnalyzer; use Psalm\Internal\Analyzer\ProjectAnalyzer; use Psalm\Internal\Provider\Providers; use Psalm\Tests\Internal\Provider; -use Psalm\Tests\Progress\VoidProgress; use Psalm\Tests\TestConfig; class CachedStorageTest extends \Psalm\Tests\TestCase @@ -38,7 +37,7 @@ class CachedStorageTest extends \Psalm\Tests\TestCase true, ProjectAnalyzer::TYPE_CONSOLE, 1, - new VoidProgress() + null ); $this->project_analyzer->setPhpVersion('7.3'); } diff --git a/tests/FileUpdates/ErrorAfterUpdateTest.php b/tests/FileUpdates/ErrorAfterUpdateTest.php index a7c8d9c40..398788a05 100644 --- a/tests/FileUpdates/ErrorAfterUpdateTest.php +++ b/tests/FileUpdates/ErrorAfterUpdateTest.php @@ -5,7 +5,6 @@ use Psalm\Internal\Analyzer\FileAnalyzer; use Psalm\Internal\Analyzer\ProjectAnalyzer; use Psalm\Internal\Provider\Providers; use Psalm\Tests\Internal\Provider; -use Psalm\Tests\Progress\VoidProgress; use Psalm\Tests\TestConfig; class ErrorAfterUpdateTest extends \Psalm\Tests\TestCase @@ -38,7 +37,7 @@ class ErrorAfterUpdateTest extends \Psalm\Tests\TestCase true, ProjectAnalyzer::TYPE_CONSOLE, 1, - new VoidProgress() + null ); $this->project_analyzer->setPhpVersion('7.3'); } diff --git a/tests/FileUpdates/ErrorFixTest.php b/tests/FileUpdates/ErrorFixTest.php index e657e22ed..473ad16b5 100644 --- a/tests/FileUpdates/ErrorFixTest.php +++ b/tests/FileUpdates/ErrorFixTest.php @@ -5,7 +5,6 @@ use Psalm\Internal\Analyzer\FileAnalyzer; use Psalm\Internal\Analyzer\ProjectAnalyzer; use Psalm\Internal\Provider\Providers; use Psalm\Tests\Internal\Provider; -use Psalm\Tests\Progress\VoidProgress; use Psalm\Tests\TestConfig; class ErrorFixTest extends \Psalm\Tests\TestCase @@ -39,7 +38,7 @@ class ErrorFixTest extends \Psalm\Tests\TestCase true, ProjectAnalyzer::TYPE_CONSOLE, 1, - new VoidProgress() + null ); $this->project_analyzer->setPhpVersion('7.3'); } diff --git a/tests/FileUpdates/TemporaryUpdateTest.php b/tests/FileUpdates/TemporaryUpdateTest.php index 5d1d223db..869ff194b 100644 --- a/tests/FileUpdates/TemporaryUpdateTest.php +++ b/tests/FileUpdates/TemporaryUpdateTest.php @@ -5,7 +5,6 @@ use Psalm\Internal\Analyzer\FileAnalyzer; use Psalm\Internal\Analyzer\ProjectAnalyzer; use Psalm\Internal\Provider\Providers; use Psalm\Tests\Internal\Provider; -use Psalm\Tests\Progress\VoidProgress; use Psalm\Tests\TestConfig; class TemporaryUpdateTest extends \Psalm\Tests\TestCase @@ -39,7 +38,7 @@ class TemporaryUpdateTest extends \Psalm\Tests\TestCase true, ProjectAnalyzer::TYPE_CONSOLE, 1, - new VoidProgress() + null ); $this->project_analyzer->setPhpVersion('7.3'); } diff --git a/tests/LanguageServer/CompletionTest.php b/tests/LanguageServer/CompletionTest.php index d08254985..a1d346fb3 100644 --- a/tests/LanguageServer/CompletionTest.php +++ b/tests/LanguageServer/CompletionTest.php @@ -7,7 +7,6 @@ use Psalm\Internal\Analyzer\FileAnalyzer; use Psalm\Internal\Analyzer\ProjectAnalyzer; use Psalm\Internal\Provider\Providers; use Psalm\Tests\Internal\Provider; -use Psalm\Tests\Progress\VoidProgress; use Psalm\Tests\TestConfig; class CompletionTest extends \Psalm\Tests\TestCase @@ -40,7 +39,7 @@ class CompletionTest extends \Psalm\Tests\TestCase true, ProjectAnalyzer::TYPE_CONSOLE, 1, - new VoidProgress() + null ); $this->project_analyzer->setPhpVersion('7.3'); $this->project_analyzer->getCodebase()->store_node_types = true; diff --git a/tests/LanguageServer/SymbolLookupTest.php b/tests/LanguageServer/SymbolLookupTest.php index ef202e06d..0ff50f4d4 100644 --- a/tests/LanguageServer/SymbolLookupTest.php +++ b/tests/LanguageServer/SymbolLookupTest.php @@ -7,7 +7,6 @@ use Psalm\Internal\Analyzer\FileAnalyzer; use Psalm\Internal\Analyzer\ProjectAnalyzer; use Psalm\Internal\Provider\Providers; use Psalm\Tests\Internal\Provider; -use Psalm\Tests\Progress\VoidProgress; use Psalm\Tests\TestConfig; class SymbolLookupTest extends \Psalm\Tests\TestCase @@ -40,7 +39,7 @@ class SymbolLookupTest extends \Psalm\Tests\TestCase true, ProjectAnalyzer::TYPE_CONSOLE, 1, - new VoidProgress() + null ); $this->project_analyzer->setPhpVersion('7.3'); diff --git a/tests/Progress/VoidProgress.php b/tests/Progress/VoidProgress.php deleted file mode 100644 index 83db49939..000000000 --- a/tests/Progress/VoidProgress.php +++ /dev/null @@ -1,8 +0,0 @@ -