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(4y ago)2452[1 issues](https://github.com/BackEndTea/psl-phpstan-extension/issues)MITPHPPHP ^7.4 || ^8.0

Since May 25Pushed 4y 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 today

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 17% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

1544d 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

[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k9.8M236](/packages/deptrac-deptrac)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67475.0M1.6k](/packages/phpstan-phpstan-doctrine)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136411.0k14](/packages/rector-rector-src)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87766.6k61](/packages/ticketswap-phpstan-error-formatter)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

39255.4k37](/packages/ec-europa-toolkit)[worksome/coding-style

Worksomes coding style

49826.1k69](/packages/worksome-coding-style)

PHPackages © 2026

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