Update vimeo/psalm and psalm/plugin-laravel#495
Open
alies-dev wants to merge 4 commits into
Open
Conversation
…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.
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.
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
commented
May 5, 2026
| * @codeCoverageIgnore | ||
| * | ||
| * @psalm-suppress DocblockTypeContradiction | ||
| * @psalm-suppress NoEnvOutsideConfig |
Contributor
Author
There was a problem hiding this comment.
or config('app.env') should be used instead of env('APP_ENV'); (line number 361)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the static-analysis toolchain:
vimeo/psalm:^5 || ^6 <6.5→^6.16.1psalm/plugin-laravel:^2.12→^3.9.2(adds Laravel 13 support)To keep CI green under the upgraded toolchain:
@psalm-suppress NoEnvOutsideConfigonConfiguration::getEnvironmentandConfiguration::getJson(theseenv()calls run before Laravel's config is bootstrapped).RedundantConditiondemoted toinfoinpsalm.xml.dist. The plugin narrowsauth()->guard()toSessionGuard, but the! $guard instanceof GuardAbstractchecks in the three controllers are intentional defensive code.