From PHP 8.2, marking all properties as readonly:

<?php
*readonly* class User
{
    public function __construct(public string $name) {}
}


Additionally: