MIR0717
InvalidReadonlyPropertyDeclaration
A readonly property is declared in a way that violates PHP’s readonly rules, such as declaring it as static or abstract.
Example
Section titled “Example”<?phpclass User { public static readonly string $name; // Error: readonly cannot be static}How to fix
Section titled “How to fix”Remove the invalid modifier combination:
<?phpclass User { public readonly string $name; // Correct: instance property with readonly}