PHPackages                             fastd/container - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. fastd/container

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

fastd/container
===============

FastD Container

v5.0.0(5y ago)319.8k26MITPHPPHP &gt;=7.2CI failing

Since Jun 21Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/fastdlabs/container)[ Packagist](https://packagist.org/packages/fastd/container)[ RSS](/packages/fastd-container/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (18)Used By (6)

Container
=========

[](#container)

[![Building](https://camo.githubusercontent.com/56446ff72f474f312d3115865fb715d597dcef510eab2d229a360b8819f6af99/68747470733a2f2f6170692e7472617669732d63692e6f72672f4a616e4875616e672f636f6e7461696e65722e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/56446ff72f474f312d3115865fb715d597dcef510eab2d229a360b8819f6af99/68747470733a2f2f6170692e7472617669732d63692e6f72672f4a616e4875616e672f636f6e7461696e65722e7376673f6272616e63683d6d6173746572)[![Latest Stable Version](https://camo.githubusercontent.com/37b4f41e50fc10654389835d047fc741680e1689010f9f896834a0dbfd4c5a7f/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f636f6e7461696e65722f762f737461626c65)](https://packagist.org/packages/fastd/container)[![Total Downloads](https://camo.githubusercontent.com/b6b29e7b9f892f8f2d1b9319a23482858042faa0d70153877664c91b057517fb/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f636f6e7461696e65722f646f776e6c6f616473)](https://packagist.org/packages/fastd/container)[![Latest Unstable Version](https://camo.githubusercontent.com/accc738fa018457a5415c4af396a25e4719948deb86b04b8e47a0c15d6674d9a/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f636f6e7461696e65722f762f756e737461626c65)](https://packagist.org/packages/fastd/container)[![License](https://camo.githubusercontent.com/847237388adadeefb760f262fcac77b3a7344a8a0031bf5b0048e0371c31f87a/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f636f6e7461696e65722f6c6963656e7365)](https://packagist.org/packages/fastd/container)

简单的PHP对象容器，DI组件已经独立维护: [di](https://github.com/fastdlabs/DI)

### Requirements

[](#requirements)

- PHP &gt;=7.2

### Installation

[](#installation)

```
composer require "fastd/container"

```

### Usage

[](#usage)

```
$container = new FastD\Container\Container();
$container->add('timezone', DateTimeZone::class);
$timezone = $this->container->get('timezone');
$this->assertInstanceOf(DateTimeZone::class, $timezone);
```

### Testing

[](#testing)

```
bin/phpunit
```

### 贡献

[](#贡献)

非常欢迎感兴趣，愿意参与其中，共同打造更好PHP生态，Swoole生态的开发者。

如果你乐于此，却又不知如何开始，可以试试下面这些事情：

- 在你的系统中使用，将遇到的问题 [反馈](https://github.com/JanHuang/fastD/issues)。
- 有更好的建议？欢迎联系  或 [新浪微博:编码侠](http://weibo.com/ecbboyjan)。

### 联系

[](#联系)

如果你在使用中遇到问题，请联系: . 微博: [编码侠](http://weibo.com/ecbboyjan)

License MIT
-----------

[](#license-mit)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance52

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~131 days

Recently: every ~335 days

Total

16

Last Release

2008d ago

Major Versions

v0.1.1 → v2.0.0-beta12016-05-09

v2.0.0 → v3.0.0-rc12016-11-25

v3.0.2 → v5.0.0-alpha12017-03-17

v3.2.1 → v5.0.02020-11-18

PHP version history (4 changes)v0.1.0PHP &gt;=5.4.0

v2.0.0-beta1PHP &gt;=7.0

v3.0.0-rc1PHP &gt;=5.6

v5.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/94c2bc821caf23977e1c3deea85e3cbc9a73a632e1afaf778638f7fe9da1c42b?d=identicon)[JanHuang](/maintainers/JanHuang)

---

Top Contributors

[![JanHuang](https://avatars.githubusercontent.com/u/7090871?v=4)](https://github.com/JanHuang "JanHuang (116 commits)")

---

Tags

injectionphpcontainerFastD

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fastd-container/health.svg)

```
[![Health](https://phpackages.com/badges/fastd-container/health.svg)](https://phpackages.com/packages/fastd-container)
```

###  Alternatives

[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[league/container

A fast and intuitive dependency injection container.

86787.8M343](/packages/league-container)[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[aura/di

A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.

356968.3k58](/packages/aura-di)[league/tactician-container

Tactician integration for any container implementing PSR-11

7710.1M23](/packages/league-tactician-container)[acclimate/container

Provides adapters for various third-party service containers.

219390.6k15](/packages/acclimate-container)

PHPackages © 2026

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