From b4d41b8743c806e75951203d3ddee97d3df52d6d Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 29 Oct 2025 09:30:49 +0100 Subject: [PATCH] Skip DocumentManagerTypeInferenceTest on PHP8+ --- .../ODM/DocumentManagerTypeInferenceTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/DoctrineIntegration/ODM/DocumentManagerTypeInferenceTest.php b/tests/DoctrineIntegration/ODM/DocumentManagerTypeInferenceTest.php index 8fe0c036..050e92f0 100644 --- a/tests/DoctrineIntegration/ODM/DocumentManagerTypeInferenceTest.php +++ b/tests/DoctrineIntegration/ODM/DocumentManagerTypeInferenceTest.php @@ -5,7 +5,7 @@ use PHPStan\Testing\TypeInferenceTestCase; use const PHP_VERSION_ID; -class DocumentManagerTypeInferenceTest extends TypeInferenceTestCase +final class DocumentManagerTypeInferenceTest extends TypeInferenceTestCase { /** @@ -13,10 +13,6 @@ class DocumentManagerTypeInferenceTest extends TypeInferenceTestCase */ public function dataFileAsserts(): iterable { - if (PHP_VERSION_ID >= 80000) { - return []; - } - yield from $this->gatherAssertTypes(__DIR__ . '/data/documentManagerDynamicReturn.php'); yield from $this->gatherAssertTypes(__DIR__ . '/data/documentRepositoryDynamicReturn.php'); yield from $this->gatherAssertTypes(__DIR__ . '/data/documentManagerMergeReturn.php'); @@ -33,6 +29,10 @@ public function testFileAsserts( ...$args ): void { + if (PHP_VERSION_ID >= 80000) { + self::markTestSkipped('Test requires PHP 7.'); + } + $this->assertFileAsserts($assertType, $file, ...$args); }