The new vendor/bin/psalm --alter --issues=ClassMustBeFinal (running v6.6) does not take into account attributes and introduces syntax errors when run.
The following:
#[Entity('addresses')]
readonly class Address
{
}
Gets "fixed" into:
final #[Entity('addresses')]
readonly class Address
{
}
Which then is a syntax error in PHP (and in Psalm too). As class attributes are often used in PHP, this is a huge pain, especially as Psalm now advocates for running this alteration.