File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -801,6 +801,15 @@ public function testBug7214(): void
801801 $ this ->assertSame (6 , $ errors [0 ]->getLine ());
802802 }
803803
804+ public function testBug12327 (): void
805+ {
806+ $ errors = $ this ->runAnalyse (__DIR__ . '/data/bug-12327.php ' );
807+ $ this ->assertCount (1 , $ errors );
808+
809+ $ this ->assertSame ('Class Bug12327\DoesNotMatter uses unknown trait Bug12327\ThisTriggersTheIssue. ' , $ errors [0 ]->getMessage ());
810+ $ this ->assertSame (15 , $ errors [0 ]->getLine ());
811+ }
812+
804813 public function testBug7215 (): void
805814 {
806815 $ errors = $ this ->runAnalyse (__DIR__ . '/data/bug-7215.php ' );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Bug12327 ;
4+
5+ trait SomeInternalTrait__TheNameIsIrrelevant
6+ {
7+ public function something (): void {}
8+ }
9+
10+ class DoesNotMatter
11+ {
12+ use SomeInternalTrait__TheNameIsIrrelevant {
13+ SomeInternalTrait__TheNameIsIrrelevant::something as methodAlias;
14+ }
15+ use ThisTriggersTheIssue;
16+
17+ public function anything (): void {}
18+ }
You can’t perform that action at this time.
0 commit comments