-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate that promoted readonly properties have a type
- Loading branch information
1 parent
8d25b62
commit 3babe95
Showing
2 changed files
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--TEST-- | ||
Promoted readonly property must have type | ||
--FILE-- | ||
<?php | ||
|
||
class Foo { | ||
public function __construct( | ||
public readonly $bar | ||
) {} | ||
} | ||
|
||
?> | ||
--EXPECTF-- | ||
Fatal error: Readonly property Foo::$bar must have type in %s on line %d |
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