PHPackages                             phil-nelson/phpstan-container-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. phil-nelson/phpstan-container-extension

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

phil-nelson/phpstan-container-extension
=======================================

PHPStan extension to resolve return type for PSR-11 container

0.3.0(1y ago)325.9k—2.8%1MITPHPPHP ^7.0 || ^8.0

Since Dec 16Pushed 1y ago2 watchersCompare

[ Source](https://github.com/phil-nelson/phpstan-container-extension)[ Packagist](https://packagist.org/packages/phil-nelson/phpstan-container-extension)[ RSS](/packages/phil-nelson-phpstan-container-extension/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

A PHPStan extension for PSR-11 ContainerInterface
=================================================

[](#a-phpstan-extension-for-psr-11-containerinterface)

This is an extension for PHPStan when using a PSR-11 ContainerInterface which returns the same type when provided with a class string.

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

[](#installation)

Install with:

```
composer require --dev phil-nelson/phpstan-container-extension

```

Add the `extension.neon` file to your PHPStan config:

```
includes:
  - vendor/phil-nelson/phpstan-container-extension/extension.neon

```

Or use [phpstan/extension-installer](https://github.com/phpstan/extension-installer)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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

Every ~565 days

Total

3

Last Release

529d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c53307b64d8a3f61193d62b1a165405c37a6ece752f370f37f24b16bef2ccf36?d=identicon)[phil-nelson](/maintainers/phil-nelson)

---

Top Contributors

[![phil-nelson](https://avatars.githubusercontent.com/u/8910254?v=4)](https://github.com/phil-nelson "phil-nelson (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phil-nelson-phpstan-container-extension/health.svg)

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

###  Alternatives

[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k455.6M9.6k](/packages/symfony-dependency-injection)[deptrac/deptrac

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

3.0k8.8M118](/packages/deptrac-deptrac)[illuminate/contracts

The Illuminate Contracts package.

706130.3M13.3k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31182.0M2.4k](/packages/illuminate-container)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k52](/packages/ecotone-ecotone)[symfony/type-info

Extracts PHP types information.

20069.8M270](/packages/symfony-type-info)

PHPackages © 2026

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