Skip to content

Upgrade to Psalm 7 and psalm-plugin-laravel v4 - #500

Closed
alies-dev wants to merge 1 commit into
imdhemy:1.xfrom
alies-dev:add-psalm7-attributes
Closed

Upgrade to Psalm 7 and psalm-plugin-laravel v4#500
alies-dev wants to merge 1 commit into
imdhemy:1.xfrom
alies-dev:add-psalm7-attributes

Conversation

@alies-dev

@alies-dev alies-dev commented Mar 16, 2026

Copy link
Copy Markdown

Summary

Upgrade static analysis tooling to Psalm 7 + psalm-plugin-laravel v4:

  • Dependencies: vimeo/psalm ^7.0@beta, psalm/plugin-laravel ^4.0@beta, orchestra/testbench ^10.0, phpunit ^11.0, laravel/framework >=12
  • Add #[\Override] to 20 methods that override parent/interface methods
  • Fix deprecated calls: $this->request->get()input() (3 places), $time->getCarbon()$time->carbon
  • Suppress new Psalm 7 strictness rules in psalm.xml:
    • ClassMustBeFinal (suppress)
    • MissingPureAnnotation (info)
    • MissingAbstractPureAnnotation (info)
    • MissingInterfaceImmutableAnnotation (info)
    • MissingImmutableAnnotation (info)
  • Baseline: net 3 lines smaller (removed fixed DeprecatedMethod for getCarbon)

Test plan

  • ./vendor/bin/psalm --no-cache passes with zero errors
  • Run existing test suite to verify no behavioral changes

@alies-dev
alies-dev requested a review from imdhemy as a code owner March 16, 2026 16:04
@alies-dev
alies-dev force-pushed the add-psalm7-attributes branch from ccde21d to 7cbdd89 Compare March 16, 2026 17:00
- Bump vimeo/psalm to ^7.0, psalm/plugin-laravel to ^4.0
- Bump orchestra/testbench to ^10.0, phpunit to ^11.0, laravel/framework to >=12
- Add #[\Override] attribute to 20 methods overriding parent/interface methods
- Replace deprecated $this->request->get() with $this->request->input()
- Replace deprecated $time->getCarbon() with $time->carbon
- Suppress new Psalm 7 strictness rules in psalm.xml (ClassMustBeFinal,
  MissingPureAnnotation, MissingImmutableAnnotation, etc.)
- Regenerate psalm-baseline.xml (net 3 lines smaller)
@alies-dev
alies-dev force-pushed the add-psalm7-attributes branch from 7cbdd89 to fdee427 Compare March 16, 2026 17:05
@alies-dev alies-dev changed the title Add PHP 8 attributes for Psalm 7 compatibility Upgrade to Psalm 7 and psalm-plugin-laravel v4 Mar 16, 2026
@alies-dev alies-dev closed this Mar 16, 2026
@alies-dev
alies-dev deleted the add-psalm7-attributes branch March 16, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant