PHP 7.4: new NewTypedProperties sniff by jrfnl · Pull Request #801 · PHPCompatibility/PHPCompatibility

@jrfnl

PHP 7.4 will be introducing support for runtime-enforced first-class property type declarations.

Ref: https://wiki.php.net/rfc/typed_properties_v2

This PR introduces a new sniff to detect the use of these and report an error if PHP < 7.4 is intended to still be supported.

The PHP 7.4 implementation does not allow for properties with the `void` or `callable` type.
If these are detected and PHP 7.4 is supposed to be supported, an error will be thrown as well.

Related:
* squizlabs/PHP_CodeSniffer#2413

@jrfnl jrfnl mentioned this pull request

Jun 1, 2019

40 tasks

wimg

wimg approved these changes Jun 20, 2019