lint/classes/add-stringable
In the modernize set. Safe fix.
What it does
A class that implements the __toString() method must explicitly implement the Stringable interface.
Configuration
[lint.rules]
"classes/add-stringable" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Replaces
stringable_for_to_string(php-cs-fixer)