fix(psalm): suppress NoEnvOutsideConfig for parity with PHPStan baseline

The Psalm Laravel plugin emits NoEnvOutsideConfig for every env() call
outside config/ — 176 instances in src/Core/config.php alone. PHPStan
already ignores the equivalent identifier
(larastan.noEnvCallsOutsideOfConfig) via phpstan.neon.

Locally Psalm doesn't load the plugin's runtime check (works via the
plugin's bootstrap file at composer install time on Linux runners), so
the failure only surfaces in CI. Suppress at the issue-handler level
matching the existing PHPStan exemption.

Co-Authored-By: Cladius Maximus <claude@anthropic.com>
This commit is contained in:
Snider 2026-04-27 16:06:41 +01:00
parent fd6092c7cf
commit ccf68c96b0

View file

@ -19,6 +19,15 @@
</errorLevel>
</MissingOverrideAttribute>
<!-- Laravel plugin (Psalm) flags env() calls outside config/. PHPStan
ignores the equivalent identifier (larastan.noEnvCallsOutsideOfConfig).
Suppress here for parity with PHPStan baseline. -->
<NoEnvOutsideConfig>
<errorLevel type="suppress">
<directory name="src" />
</errorLevel>
</NoEnvOutsideConfig>
<!-- Suppress optional dependency errors -->
<UndefinedClass>
<errorLevel type="suppress">