sirbrillig/phpcs-variable-analysis
PHPCS plugin that analyzes variable usage: warns on undefined variables (including in unset), unused variables, and use of $this/self/static outside class scope. Works with PHPCS 3.13.5+ and PHP 5.4+.
Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v3.0.0-beta.9...v3.0.0-beta.10
This is preparing for a major 3.0 release which adds a dependency on PHPCSUtils. The new version should have the same functionality, fix some subtle bugs, and increase performance by over 2x.
Dependencies
Refactoring (using phpcsutils)
getUseIndexForUseImport using findContainingOpeningBracket() (948d77f)findFunctionCallArguments custom loop with PassedParameters::getParameters() (3a0b6e4)isConstructorPromotion manual scan with FunctionDeclarations::getParameters() (5b97e89)areAnyConditionsAClass manual loop with Conditions::hasCondition() (f4ac147)getListAssignments using Lists::getAssignments (75768da)findContainingOpeningBracket with phpcsutils equivalent (6b1bdda)isVariableInsideUnset/isVariableInsideIssetOrEmpty with phpcsutils equivalents (6a30e89)T_FN (9da451f)isArrowFunction block in getScopeCloseForScopeOpen (4cc7f35)Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.13.0...v3.0.0-beta.9
Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.12.0...v2.13.0
Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.11.22...v2.12.0
Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.11.21...v2.11.22
Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.11.20...v2.11.21
Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.11.19...v2.11.20
Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.11.18...v2.11.19
Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.11.17...v2.11.18
This release is going out as a beta first because I am traveling and if I break something I won't be around to fix it for a while, but it probably will be fine.
Arrow function scope just keeps going.
Another bug fix for a static variable regression caused by https://github.com/sirbrillig/phpcs-variable-analysis/pull/267.
This is a bug fix release for two regressions caused by the new static function variable scanning added in #267.
Mostly a bunch of housekeeping changes internal to the codebase, but this does include a fix for a deprecation notice in PHP 8.2.
How can I help you explore Laravel packages today?