Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpcs Variable Analysis Laravel Package

sirbrillig/phpcs-variable-analysis

Static analysis rules for PHP_CodeSniffer that detect undefined, unused, and improperly scoped variables in PHP code. Helps enforce cleaner code, catches subtle variable bugs early, and improves overall code quality in CI and local linting workflows.

View on GitHub
Deep Wiki
Context7
v2.12.0
v2.11.22
v2.11.20

What's Changed

Minor Changes

Full Changelog: https://github.com/sirbrillig/phpcs-variable-analysis/compare/v2.11.19...v2.11.20

v2.11.19

What's Changed

New Contributors

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

v2.11.18

What's Changed

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

v2.11.18-beta.2

Changelog

v2.11.18-beta.1

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.
v2.11.17

Changelog

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

Changelog

Arrow function scope just keeps going.

  • Allow newlines in arrow functions (#301)
v2.11.15

Changelog

  • Fix scope closer detection in arrow function detection (#298)
v2.11.14

Changelog

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

Changelog

  • Support readonly constructor promotion (#294).
v2.11.12

Changelog

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

Changelog

  • Add support for enum methods (#289)
v2.11.10

Changelog

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

Changelog

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

Changelog

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

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!
v2.11.6

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)
v2.11.5

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)
v2.11.4

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.

v2.11.3

Changelog

  • Update for Composer 2.2 (#242)
v2.11.2

Changelog

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

Changelog

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

Changelog

  • Start inline block scope at end of condition rather than at keyword (#230)
  • Add allowUnusedVariablesInFileScope option (#229)
v2.10.3-beta.1

Changelog

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

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

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!)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport