Closed
Description
Pint Version
1.22
PHP Version
8.4
Description
The package currently fails to parse code that uses the new private(set) visibility modifier introduced in PHP 8.4. This results in the following error
Parse error: syntax error, unexpected token "private(set)" on line 10
Steps To Reproduce
Use the following code snippet in a project:
final readonly class AddressDTO
{
public function __construct(
private(set) ?string $country = null,
private(set) ?string $state = null,
private(set) ?string $street = null,
private(set) ?string $number = null,
private(set) ?string $zip = null
) {}
}
Run pint on the file.
Metadata
Metadata
Assignees
Labels
No labels