PHPackages                             badtomcat/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. badtomcat/container

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

badtomcat/container
===================

IOC服务容器管理组件

v0.0.1(8y ago)0441MITPHPPHP &gt;=5.4.0

Since Dec 20Pushed 8y agoCompare

[ Source](https://github.com/badtomcat/container)[ Packagist](https://packagist.org/packages/badtomcat/container)[ Docs](https://github.com/badtomcat/container)[ RSS](/packages/badtomcat-container/feed)WikiDiscussions master Synced yesterday

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

container
=========

[](#container)

IOC服务容器管理组件

> composer require badtomcat/container

```
$test = new \Badtomcat\Container();
$test->bind("foo",function (cls $ins)
{
    return $ins;
});
$this->assertEquals('foo',$test->make('foo')->bar);
$test->instance("value",123);
$this->assertEquals(123,$test->make('value'));
$this->assertTrue($test->bound("foo"));
$test->bind("bar",cls::class);
$this->assertInstanceOf(cls::class,$test->make("bar"));
```

> \[\] 操作符执行的是make和bind

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

3114d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33171263?v=4)[badtomcat](/maintainers/badtomcat)[@badtomcat](https://github.com/badtomcat)

---

Top Contributors

[![aweitian](https://avatars.githubusercontent.com/u/6269615?v=4)](https://github.com/aweitian "aweitian (5 commits)")

---

Tags

container

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psr/container

Common Container Interface (PHP FIG PSR-11)

10.0k1.0B4.4k](/packages/psr-container)[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k133.2M1.4k](/packages/pimple-pimple)[php-di/php-di

The dependency injection container for humans

2.8k53.2M1.2k](/packages/php-di-php-di)[league/container

A fast and intuitive dependency injection container.

86892.2M397](/packages/league-container)[dvdoug/boxpacker

An implementation of the 3D (actually 4D) bin packing/knapsack problem (aka creating parcels by putting items into boxes)

6552.9M23](/packages/dvdoug-boxpacker)[league/tactician-container

Tactician integration for any container implementing PSR-11

7710.3M24](/packages/league-tactician-container)

PHPackages © 2026

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