7.4 was released today and we may consider using it as a requirement for Yii 3.
What we can benefit from new features:
- Typed properties - would simplify checks overall and will make code stricter. Potentially we can adopt typed DTOs.
- Limited return type covariance and argument type contravariance - would allow to seamlessly add types for PSR interfaces (may not be needed since PHP-FIG is planning to update interfaces).
- Ability to throw
__toString()exceptions - would simplify error handler and make widgets more reliable.
Another reason is the fact that 7.2 EOLed: https://www.php.net/supported-versions.php
- Go for 7.4
- Stay with 7.2