Skip to content

Commit 65b3070

Browse files
committed
Support deprecated FQSENs for BC
1 parent ca84e5b commit 65b3070

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

src/PseudoTypes/False_.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ public function __toString() : string
3434
return 'false';
3535
}
3636
}
37+
38+
class_alias('\phpDocumentor\Reflection\PseudoTypes\False_', 'phpDocumentor\Reflection\Types\False_', false);

src/PseudoTypes/True_.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ public function __toString() : string
3434
return 'true';
3535
}
3636
}
37+
38+
class_alias('\phpDocumentor\Reflection\PseudoTypes\True_', 'phpDocumentor\Reflection\Types\True_', false);

tests/unit/PseudoTypes/FalseTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,14 @@ public function testFalseStringifyCorrectly() : void
4040

4141
$this->assertSame('false', (string) $false);
4242
}
43+
44+
/**
45+
* @covers \phpDocumentor\Reflection\PseudoTypes\False_
46+
*/
47+
public function testCanBeInstantiatedUsingDeprecatedFqsen() : void
48+
{
49+
$false = new \phpDocumentor\Reflection\Types\False_();
50+
51+
$this->assertSame('false', (string) $false);
52+
}
4353
}

tests/unit/PseudoTypes/TrueTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,14 @@ public function testTrueStringifyCorrectly() : void
4040

4141
$this->assertSame('true', (string) $true);
4242
}
43+
44+
/**
45+
* @covers \phpDocumentor\Reflection\PseudoTypes\True_
46+
*/
47+
public function testCanBeInstantiatedUsingDeprecatedFqsen() : void
48+
{
49+
$true = new \phpDocumentor\Reflection\Types\True_();
50+
51+
$this->assertSame('true', (string) $true);
52+
}
4353
}

0 commit comments

Comments
 (0)