PHPackages                             php-standard-library/psalm-plugin - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-standard-library/psalm-plugin

ActivePsalm-plugin[Utility &amp; Helpers](/categories/utility)

php-standard-library/psalm-plugin
=================================

Psalm plugin for the PHP Standard Library

2.4.0(2mo ago)252.0M—8.2%7[1 issues](https://github.com/php-standard-library/psalm-plugin/issues)20MITPHPPHP ^8.1CI passing

Since Mar 27Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/php-standard-library/psalm-plugin)[ Packagist](https://packagist.org/packages/php-standard-library/psalm-plugin)[ RSS](/packages/php-standard-library-psalm-plugin/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (8)Versions (18)Used By (20)

PSL Psalm Plugin
================

[](#psl-psalm-plugin)

[![Static analysis status](https://github.com/php-standard-library/psalm-plugin/workflows/static%20analysis/badge.svg)](https://github.com/php-standard-library/psalm-plugin/workflows/static%20analysis/badge.svg)[![Type Coverage](https://camo.githubusercontent.com/d328c23dd484b98173499092bdac969492b131048dbcbcdd13315508808464a0/68747470733a2f2f73686570686572642e6465762f6769746875622f7068702d7374616e646172642d6c6962726172792f7073616c6d2d706c7567696e2f636f7665726167652e737667)](https://shepherd.dev/github/php-standard-library/psalm-plugin)[![Total Downloads](https://camo.githubusercontent.com/955af4e0b2b09a031ba9edd90cd5c90881c549bf76bb42c93d441152435d85d6/68747470733a2f2f706f7365722e707567782e6f72672f7068702d7374616e646172642d6c6962726172792f7073616c6d2d706c7567696e2f642f746f74616c2e737667)](https://packagist.org/packages/php-standard-library/psalm-plugin)[![Latest Stable Version](https://camo.githubusercontent.com/24ffb01e203aaa68c45cdfad1fdbab20b588fee2901f2ef7559d82ddc72d9ea0/68747470733a2f2f706f7365722e707567782e6f72672f7068702d7374616e646172642d6c6962726172792f7073616c6d2d706c7567696e2f762f737461626c652e737667)](https://packagist.org/packages/php-standard-library/psalm-plugin)[![License](https://camo.githubusercontent.com/681b30f028f0a3e1762f92719e9b488e8d499f4cd4ea87337e0e070938fb00cf/68747470733a2f2f706f7365722e707567782e6f72672f7068702d7374616e646172642d6c6962726172792f7073616c6d2d706c7567696e2f6c6963656e73652e737667)](https://packagist.org/packages/php-standard-library/psalm-plugin)

Installation
------------

[](#installation)

Supported installation method is via [composer](https://getcomposer.org):

```
composer require php-standard-library/psalm-plugin --dev
```

Usage
-----

[](#usage)

To enable the plugin, add the `Psl\Psalm\Plugin` class to your psalm configuration using `psalm-plugin` binary as follows:

```
php vendor/bin/psalm-plugin enable php-standard-library/psalm-plugin
```

Type improvements
-----------------

[](#type-improvements)

Given the following example:

```
use Psl\Type;

$specification = Type\shape([
  'name' => Type\string(),
  'age' => Type\int(),
  'location' => Type\optional(Type\shape([
    'city' => Type\string(),
    'state' => Type\string(),
    'country' => Type\string(),
  ]))
]);

$input = $specification->coerce($_GET['user']);

/** @psalm-trace $input */
```

Psalm assumes that `$input` is of type `array`.

If we enable the `php-standard-library/psalm-plugin` plugin, you will get a more specific and correct type of `array{name: string, age: int, location?: array{city: string, state: string, country: string}}`.

Compatibility
-------------

[](#compatibility)

PSLPsalm pluginPsalm2.x^2.1v52.x~2.0.0v41.x1.xv4Sponsors
--------

[](#sponsors)

Thanks to our sponsors and supporters:

JetBrains[![](https://camo.githubusercontent.com/9d9420c6120ce0c02289b787dd070860ee91a700c92a45e37e5978db0ec875a0/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f617a6a657a7a2f696d6167652f75706c6f61642f76313539393233393931302f6a6574627261696e735f716e7962306f2e706e67)](https://www.jetbrains.com/?from=PSL ( PHP Standard Library ) "JetBrains")License
-------

[](#license)

The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance85

Actively maintained with recent releases

Popularity51

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 53.1% 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 ~113 days

Recently: every ~300 days

Total

17

Last Release

85d ago

Major Versions

1.1.3 → 2.0.02022-01-08

1.1.4 → 2.0.22022-02-27

1.1.5 → 2.1.02022-11-30

PHP version history (2 changes)1.0.0PHP ^7.4 || ^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/8489d7c85bfa7c637b8e13484f3f659652aea0568b6e7f9e66edeb0649b5a2f1?d=identicon)[azjezz](/maintainers/azjezz)

---

Top Contributors

[![azjezz](https://avatars.githubusercontent.com/u/29315886?v=4)](https://github.com/azjezz "azjezz (17 commits)")[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (13 commits)")[![danog](https://avatars.githubusercontent.com/u/7339644?v=4)](https://github.com/danog "danog (1 commits)")[![dragosprotung](https://avatars.githubusercontent.com/u/1081073?v=4)](https://github.com/dragosprotung "dragosprotung (1 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/php-standard-library-psalm-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/php-standard-library-psalm-plugin/health.svg)](https://phpackages.com/packages/php-standard-library-psalm-plugin)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[humanmade/psalm-plugin-wordpress

WordPress stubs and plugin for Psalm static analysis.

82488.0k23](/packages/humanmade-psalm-plugin-wordpress)[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7135.7k29](/packages/ramsey-devtools)[boesing/psalm-plugin-stringf

Psalm plugin to work with `sprintf`, `printf`, `sscanf` and `fscanf`.

12199.1k7](/packages/boesing-psalm-plugin-stringf)[orklah/psalm-strict-types

Adds strict\_types declaration when the file is provably safe

16104.4k](/packages/orklah-psalm-strict-types)

PHPackages © 2026

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