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)323.1k↓40%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 1mo 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 80% of packages

Maintenance42

Moderate activity, may be stable

Popularity31

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

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

[illuminate/container

The Illuminate Container package.

31178.1M2.0k](/packages/illuminate-container)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87578.8k35](/packages/ticketswap-phpstan-error-formatter)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[symfony/object-mapper

Provides a way to map an object to another object

34885.7k18](/packages/symfony-object-mapper)

PHPackages © 2026

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