Skip to content

Releases: sirbrillig/phpcs-variable-analysis

v2.11.3

21 Feb 17:03
c921498
Compare
Choose a tag to compare

Changelog

  • Update for Composer 2.2 (#242)

v2.11.2

06 Jul 23:46
3fad284
Compare
Choose a tag to compare

Changelog

  • Respect ignoring undefined variables in else blocks (#239)

v2.11.1

18 Jun 20:58
9df9ade
Compare
Choose a tag to compare

Changelog

  • Allow parsing mixed HTML and PHP (#234 and #236)
  • Ignore double assignment by reference if second is inside condition (#235)

v2.11.0

15 Mar 19:22
e76e816
Compare
Choose a tag to compare

Changelog

  • Start inline block scope at end of condition rather than at keyword (#230)
  • Add allowUnusedVariablesInFileScope option (#229)

v2.10.3-beta.1

09 Mar 22:33
e76e816
Compare
Choose a tag to compare
v2.10.3-beta.1 Pre-release
Pre-release

Changelog

  • Start inline block scope at end of condition rather than at keyword (#230)
  • Add allowUnusedVariablesInFileScope option (#229)

v2.10.2

18 Jan 16:24
0775e0c
Compare
Choose a tag to compare

Changelog

  • Treat writing to a by-reference foreach loop variable as a read (#221) (props to @MPParsley for finding this bug!)
  • Properly detect variables used in quotes inside arrow functions (#222) (props to @ocean90 for finding this bug!)

v2.10.2-beta.1

30 Dec 23:11
6a0b28f
Compare
Choose a tag to compare
v2.10.2-beta.1 Pre-release
Pre-release

Changelog

  • Treat writing to a by-reference foreach loop variable as a read (#221) (props to @MPParsley for finding this bug!)
  • Properly detect variables used in quotes inside arrow functions (#222) (props to @ocean90 for finding this bug!)

v2.10.1

12 Dec 18:46
c6716a9
Compare
Choose a tag to compare

Changelog

This is just a performance enhancement for certain nested list detection. In at least one example file, this brings the speed from 7 minutes down to 0.3 seconds. 😱

  • Only check one parent for recursive list assignment (#218)

v3.0.0-beta.8

23 Nov 17:45
b77e69e
Compare
Choose a tag to compare
v3.0.0-beta.8 Pre-release
Pre-release

Changelog

  • Fix array_walk pass-by-reference in 2.x (#216)

v2.10.0

05 Dec 19:15
5048655
Compare
Choose a tag to compare

Changelog

This is a pretty large release which backports nearly all the improvements that have been made to the 3.0 branch back to the 2.x line, with the major exception of adding phpcsutils as a dependency (which will still be done in 3.0 and will improve accuracy and reduce the amount of code needed by this sniff when it is released).

Notable changes from 2.9 include:

  • Fix array_walk pass-by-reference in 2.x (#216)
  • Support for PHP 7.4 arrow functions. (#179)
  • Rewritten and more accurate scope detection.
  • Allow undefined variables inside isset and empty (#204)
  • Fix error in closures with namespace separators (#197)
  • Fix complex default arguments (#198)
  • Handle inline if/else (#199)
  • Add allowUndefinedVariablesInFileScope option (#193)
  • Add allowUnusedVariablesBeforeRequire option (#196)
  • Support global scope (#190)
  • Add validUndefinedVariableRegexp option (#173) <Rubén Gómez>
  • Refactor and clean up reference variables (#187)
  • Add special cases for variables used in else blocks (#189)

Changes that this does not include (since they are breaking changes):

  • Replace UnusedVariable with UnusedParameter for parameters (#195)
  • Add sniff codes for array assignment shortcut (#205)