PHP 8.0: New `PHPCompatibility.FunctionDeclarations.RemovedCallingDestructAfterConstructorExit` sniff by jrfnl · Pull Request #1200 · PHPCompatibility/PHPCompatibility
…estructAfterConstructorExit` sniff
> If an object constructor exit()s, the object destructor will no longer be
> called. This matches the behavior when the constructor throws.
Notes:
* This sniff will throw an error, even when there is no destructor as a destructor may be declared in a parent class.
We could reduce the potential noise from this sniff a little further by only throwing the error when the class either contains a `__destruct()` method or extends a parent class.
* The name for the sniff feels a bit long. Suggestions for a better/shorter name welcome.
Opinions ?
Refs:
* https://github.com/php/php-src/blob/71bfa5344ab207072f4cd25745d7023096338385/UPGRADING#L200-L201
* php/php-src#5768 (I suspect, but not 100% sure)
* php/php-src@75a04ea
wimg approved these changes Aug 18, 2020
wimg
deleted the
php-8.0/new-removeddestructafterconstructorexit-sniff
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