Inspectopedia
 
2024.3

Promoted property usage

Info
New
Last modified: 03 December 2024

Reports properties declared through promoted constructor parameters.

Using promoted properties is only possible since PHP 8.0. In earlier PHP versions, it leads to a parse error.

See Constructor Property Promotion (php.net) for details.