Error levels

September 18, 2026 ยท View on GitHub

Psalm can run at error levels 1 (strictest) through 8 (most lenient). The default is level 2.

A stricter level (lower number) reports more issues as errors. A more lenient level (higher number) demotes issues to info (non-blocking).

Quick-reference summary

LevelStrictnessWhat changes compared to the level above
1 (strictest)Everything is an errorAdds Mixed* issues, LessSpecificReturnType as errors
2 (default)Most issuesMixed* demoted to info
3ModerateDeprecated*, MissingParamType, PropertyNotSetInConstructor demoted to info
4LenientPossibly* issues demoted to info
5More lenientInvalidScalarArgument, RedundantCondition, TooManyArguments demoted to info
6Very lenientFalsableReturnStatement, InvalidNullableReturnType demoted to info
7Extremely lenientInvalidArgument, InvalidMethodCall, UndefinedMethod demoted to info
8 (most lenient)Almost nothingMethodSignatureMismatch, UninitializedProperty demoted to info

Special categories

  • Always errors: Issues with very low false-positive rates (e.g., UndefinedClass, UndefinedVariable). These cannot be suppressed by changing the error level.
  • Feature-specific errors: Issues only reported when their feature is enabled (e.g., --taint-analysis for Tainted*, --find-unused-code for Unused*). When enabled, they are always treated as errors.

Always treated as errors

These issues have very low false-positive rates and indicate definite problems. They cannot be suppressed by changing the error level.

Errors that only appear at level 1

At the default level (2), these are reported as info. Set errorLevel="1" to treat them as errors.

Errors at level 2 and below

These issues become info (non-blocking) at level 3 and higher.

Errors at level 3 and below

These issues become info (non-blocking) at level 4 and higher.

Errors at level 4 and below

These issues become info (non-blocking) at level 5 and higher.

Errors at level 5 and below

These issues become info (non-blocking) at level 6 and higher.

Errors at level 6 and below

These issues become info (non-blocking) at level 7 and higher.

Errors at level 7 and below

These issues become info (non-blocking) at level 8.

Feature-specific errors

These issues are only reported when their corresponding feature is enabled (e.g., --taint-analysis for Tainted* issues, --find-unused-code for Unused* issues). When enabled, they are always treated as errors.