#[ReturnTypeWillChange] Is For All
2mon 27d ago by lemmy.world/u/exakat in php from php-tips.readthedocs.io
All the work to make PHP type safe and then we introduce this bullshit.
Ewww.
#[ReturnTypeWillChange] is actually for PHP native interfaces, as they were initialy not enforced, until they were. It happens to apply to custom methods too. May be static analysis should report such usage, as it is probably a code smell.