From dbf47b16c3b093f2e7cfe3a1d38764024e726c77 Mon Sep 17 00:00:00 2001 From: orklah Date: Sat, 12 Feb 2022 09:30:37 +0100 Subject: [PATCH 1/2] deprecate totallyTyped --- config.xsd | 13 ++++++++++++- src/Psalm/Config.php | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/config.xsd b/config.xsd index a4ba114c2b5..9805ba361fe 100644 --- a/config.xsd +++ b/config.xsd @@ -97,7 +97,18 @@ - + + + + Setting `totallyTyped` to `"true"` is equivalent to setting `errorLevel` to `"1"`. Setting `totallyTyped` to `"false"` is equivalent to setting `errorLevel` to `"2"` and `reportMixedIssues` to `"false"` + + + + + Deprecated. Replaced by `errorLevel` and `reportMixedIssues`. + + + diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index f87ea240977..415e254e852 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -814,7 +814,9 @@ private static function processConfigDeprecations( $deprecated_attributes = [ 'allowCoercionFromStringToClassConst', 'allowPhpStormGenerics', - 'forbidEcho' + 'forbidEcho', + 'loadXdebugStub', + 'totallyTyped' ]; $deprecated_elements = [ From 24ae96b373cb44186c58360543dcf0987436df0c Mon Sep 17 00:00:00 2001 From: orklah Date: Sat, 12 Feb 2022 09:51:06 +0100 Subject: [PATCH 2/2] remove usage of totallyTyped internally --- bin/phar.psalm.xml | 2 +- tests/Config/ConfigFileTest.php | 8 ++------ tests/fixtures/DestructiveAutoloader/psalm.xml | 1 - tests/fixtures/DummyProject/psalm.xml | 1 - tests/fixtures/ModularConfig/psalm.xml | 1 - tests/fixtures/SuicidalAutoloader/psalm.xml | 1 - 6 files changed, 3 insertions(+), 11 deletions(-) diff --git a/bin/phar.psalm.xml b/bin/phar.psalm.xml index 01098a2d88b..7fd4c48868e 100644 --- a/bin/phar.psalm.xml +++ b/bin/phar.psalm.xml @@ -2,7 +2,7 @@ - + @@ -185,9 +183,7 @@ public function removeKillsSpecifiedPluginWithOneRemaining(): void $abcEnabled = trim(' - + diff --git a/tests/fixtures/DestructiveAutoloader/psalm.xml b/tests/fixtures/DestructiveAutoloader/psalm.xml index ec68f8f2e72..3a4cc64a8af 100644 --- a/tests/fixtures/DestructiveAutoloader/psalm.xml +++ b/tests/fixtures/DestructiveAutoloader/psalm.xml @@ -1,6 +1,5 @@