Skip to content

1.0.14: feat: Report extra parameter errors on the actual parameter line

Choose a tag to compare

@pierresh pierresh released this 20 Nov 05:41
· 30 commits to master since this release
Previously, extra parameter errors were reported on the execute() line,
making it harder to identify which parameter was incorrect. Now errors
are reported on the line where the parameter key is defined in the array.

Example improvement:
Before: Line 25 - "Parameter :id1 in execute() is not used"
After:  Line 27 - "Parameter :id1 in execute() is not used"
        (where 'id1' => 1 is defined)

Changes:
- Modified extractExecuteArrayParams() to return array<array{name, line}>
  instead of array<string>, tracking each parameter's line number
- Updated validateExecuteWithArray() to use parameter line numbers when
  reporting extra parameter errors
- Refactored extractLocalVariableExecuteCalls() to use shared
  extractExecuteArrayParams() method for consistency
- Updated all type annotations to reflect new parameter structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>