-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix resolving class constant type using
self::
in a class attribute…
… argument
- Loading branch information
1 parent
fd6a0f2
commit 3447391
Showing
3 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Bug12011; | ||
|
||
use Attribute; | ||
|
||
#[Table(self::TABLE_NAME)] | ||
class HelloWorld | ||
{ | ||
private const string TABLE_NAME = 'table'; | ||
} | ||
|
||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class Table | ||
{ | ||
public function __construct( | ||
public readonly string|null $name = null, | ||
public readonly string|null $schema = null, | ||
) { | ||
} | ||
} | ||
|
||
#[Table(self::TABLE_NAME)] | ||
class HelloWorld2 | ||
{ | ||
private const int TABLE_NAME = 1; | ||
} |