From cb275252a9f852f94ea4e158800232734b676445 Mon Sep 17 00:00:00 2001 From: Romain Canon Date: Mon, 21 Nov 2022 22:57:40 +0100 Subject: [PATCH] misc!: remove support for `strict-array` type Psalm went backward on the introduction of the new `strict-array` type, see https://github.com/vimeo/psalm/pull/8701 for more information. --- src/Type/Parser/Lexer/NativeLexer.php | 1 - tests/Functional/Type/Parser/Lexer/NativeLexerTest.php | 6 ------ 2 files changed, 7 deletions(-) diff --git a/src/Type/Parser/Lexer/NativeLexer.php b/src/Type/Parser/Lexer/NativeLexer.php index 1f7db65f..c4381f41 100644 --- a/src/Type/Parser/Lexer/NativeLexer.php +++ b/src/Type/Parser/Lexer/NativeLexer.php @@ -74,7 +74,6 @@ public function tokenize(string $symbol): Token case 'integer': return IntegerToken::get(); case 'array': - case 'strict-array': return ArrayToken::array(); case 'non-empty-array': return ArrayToken::nonEmptyArray(); diff --git a/tests/Functional/Type/Parser/Lexer/NativeLexerTest.php b/tests/Functional/Type/Parser/Lexer/NativeLexerTest.php index 220dc689..88c98c04 100644 --- a/tests/Functional/Type/Parser/Lexer/NativeLexerTest.php +++ b/tests/Functional/Type/Parser/Lexer/NativeLexerTest.php @@ -628,12 +628,6 @@ public function parse_valid_types_returns_valid_result_data_provider(): iterable 'type' => ShapedArrayType::class, ]; - yield 'Strict shaped array' => [ - 'raw' => 'strict-array{foo: string}', - 'transformed' => 'array{foo: string}', - 'type' => ShapedArrayType::class, - ]; - yield 'Shaped array with single quote key' => [ 'raw' => "array{'foo': string}", 'transformed' => "array{'foo': string}",