PHP 8.4 | :sparkles: New `PHPCompatibility.Classes.NewAbstractProperties` sniff by jrfnl · Pull Request #1901 · PHPCompatibility/PHPCompatibility
jrfnl
mentioned this pull request
58 tasks
As of PHP 8.4, (hooked) properties can be declared as `abstract`. Notes: * The "abstract" modifier is not supported in constructor property promotion as that wouldn't make sense. * The "abstract" modifier is also not supported for interface properties as those are implicitly abstract (but that's not the concern of this sniff). This commit adds a new sniff to detect abstract properties as supported in PHP 8.4. For this sniff to function correctly, the PHPCSUtils minimum version needs to be v 1.1.2, which includes support for abstract properties via the `Variables::getMemberProperties()` method. Includes tests. Includes documentation. Refs: * https://wiki.php.net/rfc/property-hooks#abstract_properties * php/php-src 13455 * php/php-src@780a828
wimg approved these changes Sep 8, 2025
wimg
deleted the
php-8.4/new-newabstractpropertiessniff
branch
jrfnl
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters