PHP 8 will enable attributes. PhpStorm 2020.3 introduces an immutable Attribute: https://blog.jetbrains.com/phpstorm/2020/10/phpstorm-2020-3-eap-4/#immutable The immutable rule should detect this attribute and ensure immutability.