From 9d9fb560907fcd4f6dd16789af4278ac7f683736 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Tue, 10 Sep 2024 13:42:03 +0200 Subject: [PATCH] Fix SplObjectStorage generic stub for PHP 8.4 --- stubs/SplObjectStorage.stub | 3 ++- tests/PHPStan/Rules/Generics/ClassAncestorsRuleTest.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stubs/SplObjectStorage.stub b/stubs/SplObjectStorage.stub index 3f7c44f120..146785e522 100644 --- a/stubs/SplObjectStorage.stub +++ b/stubs/SplObjectStorage.stub @@ -5,9 +5,10 @@ * @template TData * * @template-implements Iterator + * @template-implements SeekableIterator * @template-implements ArrayAccess */ -class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess +class SplObjectStorage implements Countable, Iterator, SeekableIterator, Serializable, ArrayAccess { /** diff --git a/tests/PHPStan/Rules/Generics/ClassAncestorsRuleTest.php b/tests/PHPStan/Rules/Generics/ClassAncestorsRuleTest.php index f8d27e2612..05963f5576 100644 --- a/tests/PHPStan/Rules/Generics/ClassAncestorsRuleTest.php +++ b/tests/PHPStan/Rules/Generics/ClassAncestorsRuleTest.php @@ -108,7 +108,7 @@ public function testRuleExtends(): void 215, ], [ - 'Class ClassAncestorsExtends\FooObjectStorage @extends tag contains incompatible type ClassAncestorsExtends\FooObjectStorage&iterable.', + 'Class ClassAncestorsExtends\FooObjectStorage @extends tag contains incompatible type ClassAncestorsExtends\FooObjectStorage.', 226, ], [