phpcs-variable-analysis

Find undefined and unused variables with the PHP Codesniffer static analysis tool.

OTHER License

Downloads
30.8M
Stars
134
Committers
17

Bot releases are hidden (Show)

phpcs-variable-analysis - v2.11.18 Latest Release

Published by sirbrillig 6 months ago

What's Changed

Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.11.17...v2.11.18

phpcs-variable-analysis - v2.11.18-beta.2

Published by sirbrillig 6 months ago

Changelog

phpcs-variable-analysis - v2.11.18-beta.1

Published by sirbrillig 7 months ago

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.

Changelog

  • Make sure that recursive search of list assignments stays inside them (#318)
  • A bunch of package updates that shouldn't affect things.
phpcs-variable-analysis - v2.11.17

Published by sirbrillig about 1 year ago

Changelog

  • Do not close scope of ref reassignment when inside else (#306)
phpcs-variable-analysis - v2.11.16

Published by sirbrillig over 1 year ago

Changelog

Arrow function scope just keeps going.

  • Allow newlines in arrow functions (#301)
phpcs-variable-analysis - v2.11.15

Published by sirbrillig over 1 year ago

Changelog

  • Fix scope closer detection in arrow function detection (#298)
phpcs-variable-analysis - v2.11.14

Published by sirbrillig over 1 year ago

Changelog

  • Use custom logic for finding arrow function scope (#296)
phpcs-variable-analysis - v2.11.13

Published by sirbrillig over 1 year ago

Changelog

  • Support readonly constructor promotion (#294).
phpcs-variable-analysis - v2.11.12

Published by sirbrillig over 1 year ago

Changelog

  • Allow non-enum tokens called 'enum' (#293)
phpcs-variable-analysis - v2.11.11

Published by sirbrillig over 1 year ago

Changelog

  • Add support for enum methods (#289)
phpcs-variable-analysis - v2.11.10

Published by sirbrillig almost 2 years ago

Changelog

  • Composer: allow for the 1.0.0 version of the Composer PHPCS plugin (#287)
phpcs-variable-analysis - v2.11.9

Published by sirbrillig about 2 years ago

Changelog

  • Prevent detecting static closures when looking for static variables (#281)
phpcs-variable-analysis - v2.11.8

Published by sirbrillig about 2 years ago

Changelog

  • Fix function call detection to exclude non-function tokens (#279)
phpcs-variable-analysis - v2.11.7

Published by sirbrillig about 2 years ago

Changelog

Another bug fix for a static variable regression caused by https://github.com/sirbrillig/phpcs-variable-analysis/pull/267.

  • Place static arrow function body outside of scope on static declaration check (#276) Props @arkener!
phpcs-variable-analysis - v2.11.6

Published by sirbrillig about 2 years ago

Changelog

This is a bug fix release for two regressions caused by the new static function variable scanning added in #267.

  • Ignore function call arguments on static declarations processing (#273) props @arkener!
  • Fix scanning for static variables near start of file (#274)
phpcs-variable-analysis - v2.11.5

Published by sirbrillig about 2 years ago

Changelog

  • Allow for loop increment expression to use variable defined inside loop (#262)
  • Support constructor promotion (#266)
  • Improve static declaration checks (#267)
  • Handle inline if list destructure (#268)
  • Remove php_errormsg from superglobals list (#269)
  • Ignore unused parameters when function in abstract class is empty (#270)
phpcs-variable-analysis - v2.11.4

Published by sirbrillig about 2 years ago

Changelog

Mostly a bunch of housekeeping changes internal to the codebase, but this does include a fix for a deprecation notice in PHP 8.2.

phpcs-variable-analysis - v2.11.3

Published by sirbrillig over 2 years ago

Changelog

  • Update for Composer 2.2 (#242)
phpcs-variable-analysis - v2.11.2

Published by sirbrillig over 3 years ago

Changelog

  • Respect ignoring undefined variables in else blocks (#239)
phpcs-variable-analysis - v2.11.1

Published by sirbrillig over 3 years ago

Changelog

  • Allow parsing mixed HTML and PHP (#234 and #236)
  • Ignore double assignment by reference if second is inside condition (#235)
Package Rankings
Top 0.9% on Packagist.org
Badges
Extracted from project README's
CS and QA Build Status Test Build Status Coverage Status