1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Update BCC Checks

This commit is contained in:
Daniil Gentili 2023-07-26 10:56:13 +02:00
parent 4ec3184c94
commit aa1f2c730d
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 19 additions and 3 deletions

View File

@ -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

View File

@ -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]);