valkyrja/psalm

Psalm for the Valkyrja Project.

Maintainers

Package info

github.com/valkyrjaio/psalm

Homepage

Type:project

pkg:composer/valkyrja/psalm

Statistics

Installs: 82

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v26.1.3 2026-04-16 23:29 UTC

This package is auto-updated.

Last update: 2026-04-17 00:21:12 UTC


README

Valkyrja Psalm

Psalm configuration for the Valkyrja project.

PHP Version Require Latest Stable Version License Scrutinizer Coverage Status Psalm Shepherd Maintainability Rating

Build Status

Linting PHP Code Sniffer Build Status PHP CS Fixer Build Status
Coding Rules PHPArkitect Build Status Rector Build Status
Static Analysis PHPStan Build Status Psalm Build Status
Testing PHPUnit Build Status

Usage

Place a psalm.xml in your CI directory pointing to the project source. Run via the root Composer scripts:

# Check only (no shepherd, no cache cleared)
composer psalm

# Check with no cache
composer psalm-no-cache

# Post results to Psalm Shepherd
composer psalm-shepherd

# Post results with stats to Psalm Shepherd
composer psalm-shepherd-with-stats

# Show type coverage stats
composer psalm-stats

# Update the baseline file
composer psalm-update-baseline

Configuration

The CI directory ships with a psalm.xml that serves as the reference configuration. Key settings:

Setting Value Effect
errorLevel 1 Strictest level — all issues reported
totallyTyped true Every expression must be typed
findUnusedBaselineEntry true Warns when a baseline suppression is no longer needed
findUnusedCode false Dead-code detection disabled
errorBaseline psalm-baseline.xml Known issues tracked in baseline; update with composer psalm-update-baseline

Scanned Paths

Path Included
src/ Yes
vendor/ No

Suppressed Issue Types

These issue types are suppressed globally via <issueHandlers>:

Issue Reason
PropertyNotSetInConstructor Properties initialised outside constructors are common in the framework
DeprecatedClass Suppressed temporarily while the Env class deprecation is in progress
ClassMustBeFinal Framework classes are intentionally left non-final for extensibility
RedundantPropertyInitializationCheck False positives triggered by ??= assignments
UnsafeInstantiation Child class constructor parameter matching is left to the developer

Notes

  • PSALM_ALLOW_XDEBUG=1 is set in CI as a workaround for a JIT interaction with the #[Override] attribute. See vimeo/psalm#11723.
  • An autoload.php is required in the CI directory to bootstrap the project autoloader before Psalm analyses the source.