diff --git a/psalm-baseline.xml b/psalm-baseline.xml index bd1946230cc..b04ad4de319 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $comment_block->tags['variablesfrom'][0] @@ -21,11 +21,13 @@ $matches[0] $symbol_parts[1] - - $analysis_php_version_id - + + getAdditionalFileExtensions + getAdditionalFileTypeAnalyzers + getAdditionalFileTypeScanners + $codebase->php_major_version $codebase->php_major_version @@ -35,11 +37,6 @@ $codebase->php_minor_version $this->load_xdebug_stub - - getAdditionalFileExtensions - getAdditionalFileTypeScanners - getAdditionalFileTypeAnalyzers - @@ -205,17 +202,26 @@ - + + new TPositiveInt() + + Type::getEmpty() Type::getEmpty() Type::getEmpty() Type::getEmpty() + Type::getPositiveInt(true) $invalid_left_messages[0] $invalid_right_messages[0] + + + Type::getPositiveInt() + + $codebase->php_major_version @@ -256,6 +262,11 @@ + + new TPositiveInt + new TPositiveInt + new TPositiveInt + Type::getEmpty() @@ -337,6 +348,11 @@ Type::getEmpty() + + + Type::getPositiveInt() + + $invalid_fetch_types[0] @@ -567,10 +583,21 @@ $codebase->php_major_version + + + TPositiveInt::class + + + + + TPositiveInt::class + + - + new TEmpty() new TEmpty() + new TPositiveInt() Type::getEmpty() @@ -601,6 +628,9 @@ + + new TPositiveInt() + $combination->array_type_params[1] $combination->array_type_params[1] @@ -611,6 +641,9 @@ + + new TPositiveInt() + $intersection_types[0] $parse_tree->children[0] @@ -623,12 +656,6 @@ array_keys($template_type_map[$template_param_name])[0] - - - addFileExtension - addFileExtension - - VirtualClass @@ -654,22 +681,30 @@ VirtualConst + + + addFileExtension + addFileExtension + + $rules[0] - + new TEmpty new TEmpty new TEmpty() + new TPositiveInt() - + new TEmpty() new THtmlEscapedString() + new TPositiveInt() array_keys($template_type_map[$value])[0] diff --git a/src/Psalm/Type.php b/src/Psalm/Type.php index 6d0c9e0fb45..35ca811372e 100644 --- a/src/Psalm/Type.php +++ b/src/Psalm/Type.php @@ -196,6 +196,7 @@ public static function getLowercaseString(): Union return new Union([$type]); } + /** @deprecated will be removed in Psalm 5 */ public static function getPositiveInt(bool $from_calculation = false): Union { $union = new Union([new TPositiveInt()]); diff --git a/src/Psalm/Type/Atomic/TPositiveInt.php b/src/Psalm/Type/Atomic/TPositiveInt.php index eb345a0ba1a..4e45ef06e32 100644 --- a/src/Psalm/Type/Atomic/TPositiveInt.php +++ b/src/Psalm/Type/Atomic/TPositiveInt.php @@ -4,6 +4,7 @@ /** * Denotes an int that is also positive (strictly > 0) + * @deprecated will be removed in Psalm 5 */ class TPositiveInt extends TInt {