Created
October 4, 2017 13:19
-
-
Save alcaeus/2481b761258f30e75b70431045a130bc to your computer and use it in GitHub Desktop.
Broken class aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types = 1); | |
if (false) { | |
// Alias will never be used | |
class_alias('FakeParentClass', 'ParentClass'); | |
} | |
class ChildClass extends ParentClass | |
{ | |
public function bar(): void | |
{ | |
$this->foo(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types = 1); | |
class ParentClass | |
{ | |
public function foo(): void | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment