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:
parent
4ec3184c94
commit
aa1f2c730d
16
UPGRADING.md
16
UPGRADING.md
@ -9,6 +9,22 @@
|
|||||||
|
|
||||||
- [BC] The `TDependentListKey` type was removed and replaced with an optional property of the `TIntRange` type.
|
- [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
|
# Upgrading from Psalm 4 to Psalm 5
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ class TKeyedArray extends Atomic
|
|||||||
/**
|
/**
|
||||||
* @return TArray|TNonEmptyArray
|
* @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 = [];
|
$key_types = [];
|
||||||
$value_type = null;
|
$value_type = null;
|
||||||
@ -398,7 +398,7 @@ class TKeyedArray extends Atomic
|
|||||||
$key_type = new Union([new TIntRange(0, null, false, $list_var_id)]);
|
$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 TNonEmptyArray([$key_type, $value_type]);
|
||||||
}
|
}
|
||||||
return new TArray([$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);
|
$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 TNonEmptyArray([$key_type, $value_type]);
|
||||||
}
|
}
|
||||||
return new TArray([$key_type, $value_type]);
|
return new TArray([$key_type, $value_type]);
|
||||||
|
Loading…
Reference in New Issue
Block a user