Skip to content

Commit cbf2b32

Browse files
authored
Merge branch refs/heads/1.12.x into 2.1.x
2 parents 3a62b4c + 812d7da commit cbf2b32

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,12 +516,9 @@ public function testBug6255(): void
516516
public function testBug6300(): void
517517
{
518518
$errors = $this->runAnalyse(__DIR__ . '/data/bug-6300.php');
519-
$this->assertCount(2, $errors);
519+
$this->assertCount(1, $errors);
520520
$this->assertSame('Call to an undefined method Bug6300\Bar::get().', $errors[0]->getMessage());
521-
$this->assertSame(23, $errors[0]->getLine());
522-
523-
$this->assertSame('Access to an undefined property Bug6300\Bar::$fooProp.', $errors[1]->getMessage());
524-
$this->assertSame(24, $errors[1]->getLine());
521+
$this->assertSame(27, $errors[0]->getLine());
525522
}
526523

527524
public function testBug6466(): void

tests/PHPStan/Analyser/data/bug-6300.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
namespace Bug6300;
44

5+
use AllowDynamicProperties;
6+
57
/**
68
* @mixin Bar
79
*/
10+
#[AllowDynamicProperties]
811
class Foo
912
{
1013

@@ -13,6 +16,7 @@ class Foo
1316
/**
1417
* @mixin Foo
1518
*/
19+
#[AllowDynamicProperties]
1620
class Bar
1721
{
1822

0 commit comments

Comments
 (0)