Skip to content

Update vimeo/psalm and psalm/plugin-laravel#495

Open
alies-dev wants to merge 4 commits into
auth0:mainfrom
alies-dev:update/psalm-6-and-plugin-laravel-3.8
Open

Update vimeo/psalm and psalm/plugin-laravel#495
alies-dev wants to merge 4 commits into
auth0:mainfrom
alies-dev:update/psalm-6-and-plugin-laravel-3.8

Conversation

@alies-dev
Copy link
Copy Markdown
Contributor

@alies-dev alies-dev commented May 4, 2026

Updates the static-analysis toolchain:

  • vimeo/psalm: ^5 || ^6 <6.5^6.16.1
  • psalm/plugin-laravel: ^2.12^3.9.2 (adds Laravel 13 support)

To keep CI green under the upgraded toolchain:

  • @psalm-suppress NoEnvOutsideConfig on Configuration::getEnvironment and Configuration::getJson (these env() calls run before Laravel's config is bootstrapped).
  • RedundantCondition demoted to info in psalm.xml.dist. The plugin narrows auth()->guard() to SessionGuard, but the ! $guard instanceof GuardAbstract checks in the three controllers are intentional defensive code.

…o ^3.8

Bumps psalm from `^5 || ^6 <6.5` to `^6.16.1` and the Laravel plugin
from `^2.12` to `^3.8`. Adds a psalm-baseline.xml capturing 5 issues
the upgraded toolchain newly reports (NoEnvOutsideConfig in
Configuration::getEnvironment/getJson and RedundantCondition for the
GuardAbstract instanceof check in three controllers) so CI stays green.
@alies-dev alies-dev requested a review from a team as a code owner May 4, 2026 22:04
@alies-dev alies-dev changed the title chore(deps): update vimeo/psalm to ^6.16.1 and psalm/plugin-laravel to ^3.8 Update vimeo/psalm to ^6.16.1 and psalm/plugin-laravel to ^3.8 May 4, 2026
Alies Lapatsin added 2 commits May 5, 2026 00:14
Removes the three controller entries from the baseline and lowers
RedundantCondition globally instead. The plugin's narrowed inference of
auth()->guard() to SessionGuard makes the GuardAbstract instanceof
checks look redundant, but they are intentional defensive code and any
future occurrences shouldn't fail CI either.
v3.9.2 adds Laravel 13 support to the 3.x line, matching the
illuminate/* ^13 entry already in require. Bumping the minimum so that
anyone installing on Laravel 13 picks up a plugin version that knows
about the new framework.
@alies-dev alies-dev changed the title Update vimeo/psalm to ^6.16.1 and psalm/plugin-laravel to ^3.8 chore(deps): update vimeo/psalm to ^6.16.1 and psalm/plugin-laravel to ^3.9.2 May 4, 2026
The two env('APP_ENV') calls in Configuration::getEnvironment and
Configuration::getJson run before Laravel's config is bootstrapped, so
they intentionally bypass the cached-config path. Annotating them
inline matches the existing @psalm-suppress style in this file and
removes the now-empty baseline (and its psalm.xml.dist reference).
@alies-dev alies-dev changed the title chore(deps): update vimeo/psalm to ^6.16.1 and psalm/plugin-laravel to ^3.9.2 Update vimeo/psalm and psalm/plugin-laravel May 5, 2026
Comment thread src/Configuration.php
* @codeCoverageIgnore
*
* @psalm-suppress DocblockTypeContradiction
* @psalm-suppress NoEnvOutsideConfig
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or config('app.env') should be used instead of env('APP_ENV'); (line number 361)

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