Skip to content

Commit a290135

Browse files
staabmphpstan-bot
authored andcommitted
Added regression test for #11968
- New integration test testBug11968 in AnalyserIntegrationTest - Test data file with 500-case UnitEnum with match expression and method calls - Covers the pattern from the issue: large enum with match($this) returning strings - Ensures analysis of large enums completes in reasonable time without errors Closes phpstan/phpstan#11968
1 parent 0b8e988 commit a290135

2 files changed

Lines changed: 1047 additions & 0 deletions

File tree

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,13 @@ public function testBug11263(): void
14621462
$this->assertNoErrors($errors);
14631463
}
14641464

1465+
#[RequiresPhp('>= 8.1')]
1466+
public function testBug11968(): void
1467+
{
1468+
$errors = $this->runAnalyse(__DIR__ . '/data/bug-11968.php');
1469+
$this->assertNoErrors($errors);
1470+
}
1471+
14651472
#[RequiresPhp('>= 8.0')]
14661473
public function testBug11147(): void
14671474
{

0 commit comments

Comments
 (0)