PHPackages                             backendtea/psl-phpstan-extension - 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. backendtea/psl-phpstan-extension

ActivePhpstan-extension[Utility &amp; Helpers](/categories/utility)

backendtea/psl-phpstan-extension
================================

PHPStan psl extension

0.0.1(3y ago)2452[1 issues](https://github.com/BackEndTea/psl-phpstan-extension/issues)MITPHPPHP ^7.4 || ^8.0

Since May 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/BackEndTea/psl-phpstan-extension)[ Packagist](https://packagist.org/packages/backendtea/psl-phpstan-extension)[ RSS](/packages/backendtea-psl-phpstan-extension/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

PHPStan PSL extension
=====================

[](#phpstan-psl-extension)

Description
-----------

[](#description)

The main scope of this extension is to help phpstan to detect the types after using `Psl\Type\shape`. Its intended to produce the same output as the [psalm plugin](https://github.com/php-standard-library/psalm-plugin). 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']);
```

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

If we enable the extension, you will get a more specific and correct type of `array{name: string, age: int, location?: array{city: string, state: string, country: string}}`.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1452d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14289961?v=4)[Gert de Pagter](/maintainers/BackEndTea)[@BackEndTea](https://github.com/BackEndTea)

---

Top Contributors

[![BackEndTea](https://avatars.githubusercontent.com/u/14289961?v=4)](https://github.com/BackEndTea "BackEndTea (2 commits)")

###  Code Quality

TestsPHPUnit

Type Coverage Yes

### Embed Badge

![Health badge](/badges/backendtea-psl-phpstan-extension/health.svg)

```
[![Health](https://phpackages.com/badges/backendtea-psl-phpstan-extension/health.svg)](https://phpackages.com/packages/backendtea-psl-phpstan-extension)
```

###  Alternatives

[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87578.8k35](/packages/ticketswap-phpstan-error-formatter)[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7134.7k26](/packages/ramsey-devtools)[johnbillion/wp-compat

PHPStan extension to help verify that your PHP code is compatible with a given version of WordPress

24115.0k10](/packages/johnbillion-wp-compat)

PHPackages © 2026

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