PHPackages                             valkyrja/psalm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. valkyrja/psalm

ActiveProject[DevOps &amp; Deployment](/categories/devops)

valkyrja/psalm
==============

Psalm for the Valkyrja Project.

v26.1.4(1mo ago)01.9k—9.5%MITPHPPHP &gt;=8.4CI passing

Since Apr 16Pushed 1w agoCompare

[ Source](https://github.com/valkyrjaio/ci-psalm-php)[ Packagist](https://packagist.org/packages/valkyrja/psalm)[ Docs](https://www.valkyrja.io/)[ RSS](/packages/valkyrja-psalm/feed)WikiDiscussions 26.x Synced 1w ago

READMEChangelog (6)Dependencies (1)Versions (18)Used By (0)

[ ![](https://raw.githubusercontent.com/valkyrjaio/art/refs/heads/master/long-banner/orange/php.png)](https://valkyrja.io)

Valkyrja Psalm
==============

[](#valkyrja-psalm)

Shared Psalm configuration for Valkyrja PHP projects — a reference configuration and reusable workflow that enforce consistent static analysis across consuming repositories.

 [![PHP Version Require](https://camo.githubusercontent.com/9828dac19bfdefc08903c38b6a18a1f7bdf8cb2d3eeb82ff369d197309b90280/68747470733a2f2f706f7365722e707567782e6f72672f76616c6b79726a612f7073616c6d2f726571756972652f706870)](https://packagist.org/packages/valkyrja/psalm) [![Latest Stable Version](https://camo.githubusercontent.com/0d5da081ed4dcb273d69cb558f15bf3b06c24dc2ed16228c13e8b056a7dddcd3/68747470733a2f2f706f7365722e707567782e6f72672f76616c6b79726a612f7073616c6d2f76)](https://packagist.org/packages/valkyrja/psalm) [![License](https://camo.githubusercontent.com/2005cc0eca70923777c6ae3adbf6f76401cd8f32793709ffa81d8576cf600f73/68747470733a2f2f706f7365722e707567782e6f72672f76616c6b79726a612f7073616c6d2f6c6963656e7365)](https://packagist.org/packages/valkyrja/psalm) [![CI Status](https://github.com/valkyrjaio/ci-psalm-php/actions/workflows/ci.yml/badge.svg?branch=26.x)](https://github.com/valkyrjaio/ci-psalm-php/actions/workflows/ci.yml?query=branch%3A26.x) [![Scrutinizer](https://camo.githubusercontent.com/930a419990db87089742fc4edd4b2ee0d198e7f886448de42e899f0bfc6f0ecd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f76616c6b79726a61696f2f63692d7073616c6d2d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d32362e78)](https://scrutinizer-ci.com/g/valkyrjaio/ci-psalm-php/?branch=26.x) [![Coverage Status](https://camo.githubusercontent.com/6b18f9f5a3948a184c6c6132b636697da0b535a694b8bde93d2d892045f93d38/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f76616c6b79726a61696f2f63692d7073616c6d2d7068702f62616467652e7376673f6272616e63683d32362e78)](https://coveralls.io/github/valkyrjaio/ci-psalm-php?branch=26.x) [![Psalm Shepherd](https://camo.githubusercontent.com/9592abeb4604866cb1e5e77da0b25eef8de057889d9caef2dd445b5f70fd719c/68747470733a2f2f73686570686572642e6465762f6769746875622f76616c6b79726a61696f2f63692d7073616c6d2d7068702f636f7665726167652e737667)](https://shepherd.dev/github/valkyrjaio/ci-psalm-php) [![Maintainability Rating](https://camo.githubusercontent.com/9539432e268ccfc6cf77a9af1bd3c44f03dbc2a07c384a7700b7f66d7598178f/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d76616c6b79726a61696f5f7073616c6d266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/summary/new_code?id=valkyrjaio_psalm)

Usage
-----

[](#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
-------------

[](#configuration)

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

SettingValueEffect`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

[](#scanned-paths)

PathIncluded`src/`Yes`vendor/`No### Suppressed Issue Types

[](#suppressed-issue-types)

These issue types are suppressed globally via ``:

IssueReason`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

[](#notes)

- `PSALM_ALLOW_XDEBUG=1` is set in CI as a workaround for a JIT interaction with the `#[Override]` attribute. See [vimeo/psalm#11723](https://github.com/vimeo/psalm/issues/11723).
- An `autoload.php` is required in the CI directory to bootstrap the project autoloader before Psalm analyses the source.

Workflows
---------

[](#workflows)

The [`_workflow-call.yml`](.github/workflows/_workflow-call.yml) reusable workflow runs Psalm against the calling repository's source. It is designed to be called from other repositories via `workflow_call`.

### Inputs

[](#inputs)

InputTypeDefaultDescription`paths`string—**Required.** YAML filter spec with two keys: `ci` (CI config files that trigger a base-branch fetch) and `files` (all files that trigger the check).`post-pr-comment`boolean`true`Post a PR comment on failure and remove it on success. Disable when the calling workflow handles its own reporting.`composer-options`string`''`Extra flags passed to every `composer install` step (e.g. `--ignore-platform-req=ext-openswoole`).`php-version`string`'8.4'`PHP version to use.`ci-directory`string`'.github/ci/psalm'`Path to the CI directory containing `composer.json` and the tool config.`extensions`string`'mbstring, intl'`PHP extensions to install via `shivammathur/setup-php`.`additional-directory`string`''`Path to an additional Composer dependencies directory to install before running Psalm. Leave empty to skip.`run-script`string`'psalm'`Composer script to run (e.g. `psalm`, `psalm-shepherd`, `psalm-shepherd-with-stats`).### Usage

[](#usage-1)

```
jobs:
  psalm:
    uses: valkyrjaio/ci-psalm-php/.github/workflows/_workflow-call.yml@26.x
    permissions:
      pull-requests: write
      contents: read
    with:
      php-version: '8.4'
      run-script: 'psalm-shepherd-with-stats'
      paths: |
        ci:
          - '.github/ci/psalm/**'
          - '.github/workflows/psalm.yml'
        files:
          - '.github/ci/psalm/**'
          - '.github/workflows/psalm.yml'
          - 'src/**/*.php'
          - 'composer.json'
    secrets: inherit
```

`secrets: inherit` is required to pass the `VALKYRJA_GHA_APP_ID` and `VALKYRJA_GHA_PRIVATE_KEY` org secrets used for PR comments.

Contributing
------------

[](#contributing)

See [`CONTRIBUTING.md`](https://github.com/valkyrjaio/.github/blob/master/CONTRIBUTING.md) for the submission process and [`VOCABULARY.md`](https://github.com/valkyrjaio/.github/blob/master/VOCABULARY.md) for the terminology used across Valkyrja.

Security Issues
---------------

[](#security-issues)

If you discover a security vulnerability, please follow our [disclosure procedure](https://github.com/valkyrjaio/.github/blob/master/SECURITY.md).

License
-------

[](#license)

Licensed under the [MIT license](https://opensource.org/licenses/MIT). See [`LICENSE.md`](./LICENSE.md).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 52.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

7

Last Release

8d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbb43a59fb790365b014e53f82e3f26893867e4a47a249fc92962b6dc76878f2?d=identicon)[MelechMizrachi](/maintainers/MelechMizrachi)

---

Top Contributors

[![valkyrja-volundr[bot]](https://avatars.githubusercontent.com/in/2462900?v=4)](https://github.com/valkyrja-volundr[bot] "valkyrja-volundr[bot] (50 commits)")[![MelechMizrachi](https://avatars.githubusercontent.com/u/1179171?v=4)](https://github.com/MelechMizrachi "MelechMizrachi (45 commits)")

---

Tags

cipsalmvalkyrja

### Embed Badge

![Health badge](/badges/valkyrja-psalm/health.svg)

```
[![Health](https://phpackages.com/badges/valkyrja-psalm/health.svg)](https://phpackages.com/packages/valkyrja-psalm)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[saggre/phpdocumentor-markdown

Markdown template for phpDocumentor3

2293.1k41](/packages/saggre-phpdocumentor-markdown)[beechit/json-to-code-climate-subset-converter

CLI tool that'll convert supported JSON files to a subset of the Code Climate JSON format.

1936.8k](/packages/beechit-json-to-code-climate-subset-converter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
