diff --git a/UPGRADING.md b/UPGRADING.md index 01f1a67dd..33853b51f 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -9,6 +9,22 @@ - [BC] The `TDependentListKey` type was removed and replaced with an optional property of the `TIntRange` type. +- [BC] Property `Config::$shepherd_host` was replaced with `Config::$shepherd_endpoint` + +- [BC] Methods `Codebase::getSymbolLocation()` and `Codebase::getSymbolInformation()` were replaced with `Codebase::getSymbolLocationByReference()` + +- [BC] Method `Psalm\Type\Atomic\TKeyedArray::getList()` was removed + +- [BC] Method `Psalm\Storage\FunctionLikeStorage::getSignature()` was replaced with `FunctionLikeStorage::getCompletionSignature()` + +- [BC] Property `Psalm\Storage\FunctionLikeStorage::$unused_docblock_params` was replaced with `FunctionLikeStorage::$unused_docblock_parameters` + +- [BC] Method `Plugin\Shepherd::getCurlErrorMessage()` was removed + +- [BC] Property `Config::$find_unused_code` changed default value from false to true + +- [BC] Property `Config::$find_unused_baseline_entry` changed default value from false to true + # Upgrading from Psalm 4 to Psalm 5 ## Changed diff --git a/src/Psalm/Type/Atomic/TKeyedArray.php b/src/Psalm/Type/Atomic/TKeyedArray.php index 776a71b68..f3696e144 100644 --- a/src/Psalm/Type/Atomic/TKeyedArray.php +++ b/src/Psalm/Type/Atomic/TKeyedArray.php @@ -359,7 +359,7 @@ class TKeyedArray extends Atomic /** * @return TArray|TNonEmptyArray */ - public function getGenericArrayType(bool $allow_non_empty = true, ?string $list_var_id = null): TArray + public function getGenericArrayType(?string $list_var_id = null): TArray { $key_types = []; $value_type = null; @@ -398,7 +398,7 @@ class TKeyedArray extends Atomic $key_type = new Union([new TIntRange(0, null, false, $list_var_id)]); } - if ($has_defined_keys && $allow_non_empty) { + if ($has_defined_keys) { return new TNonEmptyArray([$key_type, $value_type]); } return new TArray([$key_type, $value_type]); @@ -414,7 +414,7 @@ class TKeyedArray extends Atomic $value_type = $value_type->setPossiblyUndefined(false); - if ($allow_non_empty && ($has_defined_keys || $this->fallback_params !== null)) { + if ($has_defined_keys || $this->fallback_params !== null) { return new TNonEmptyArray([$key_type, $value_type]); } return new TArray([$key_type, $value_type]);