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

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

cal-container/cal-container
===========================

cal-container

v0.1.9(6y ago)023MITPHPPHP ^7.0CI failing

Since Oct 10Pushed 5y agoCompare

[ Source](https://github.com/cal-container/cal-container)[ Packagist](https://packagist.org/packages/cal-container/cal-container)[ RSS](/packages/cal-container-cal-container/feed)WikiDiscussions master Synced 3d ago

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

cal-container
=============

[](#cal-container)

说明
--

[](#说明)

- 基于反射实现的php容器项目，包含自动注入，静态注册，动态注册，动态传参等功能
- 遵循PSR-11容器规范

安装
--

[](#安装)

```
composer require 'cal-container/cal-container'

```

使用说明
----

[](#使用说明)

参考:
---

[](#参考)

### [关于PSR](https://learnku.com/index.php/docs/psr/about-psr/1613)

[](#关于psr)

- [php-fig 容器规范](https://github.com/php-fig/container)
- [PSR-11 容器接口](https://learnku.com/index.php/docs/psr/psr-11-container/1621)
- [PSR-11 容器接口 - 说明文档](https://learnku.com/index.php/docs/psr/psr-11-container-meta/1622)

### github上现有的php容器部分开源项目

[](#github上现有的php容器部分开源项目)

- [php-di](https://github.com/PHP-DI/PHP-DI)
- [silexphp/Pimple](https://github.com/silexphp/Pimple)
- [laravel-container](https://github.com/illuminate/container)

### 反射api

[](#反射api)

- [Reflection](https://www.php.net/manual/zh/class.reflection.php)
    - [ReflectionClass](https://www.php.net/manual/zh/class.reflectionclass.php)
    - [ReflectionObject](https://www.php.net/manual/zh/class.reflectionobject.php)
    - [ReflectionMethod](https://www.php.net/manual/zh/class.reflectionmethod.php)
    - [ReflectionFunction](https://www.php.net/manual/zh/class.reflectionfunction.php)
    - [ReflectionProperty](https://www.php.net/manual/zh/class.reflectionproperty.php)

### 测试

[](#测试)

- [phpunit](http://www.phpunit.cn/)

plan
----

[](#plan)

### 注解实现

[](#注解实现)

- `@dataProvider` 数据提供
- `@decorator` 装饰器
- `@exception` 异常处理
- `@final` final处理(在所有注解处理完成，函数返回前)
- `@tag(...)` tag数据
- aop实现(利用装饰器特征)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~1 days

Total

2

Last Release

2407d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7888563475c591a3e1d4b436addcf24d8726c5d58ed8ac35779b858ec7897ca6?d=identicon)[cal-container](/maintainers/cal-container)

---

Top Contributors

[![chanlly](https://avatars.githubusercontent.com/u/18607258?v=4)](https://github.com/chanlly "chanlly (6 commits)")[![cal-container](https://avatars.githubusercontent.com/u/13598026?v=4)](https://github.com/cal-container "cal-container (2 commits)")

---

Tags

phpcontainercalcaljectchanlly

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[lctrs/psalm-psr-container-plugin

Let Psalm understand better psr11 containers

17648.1k13](/packages/lctrs-psalm-psr-container-plugin)[gacela-project/container

A minimalistic container dependency resolver

1175.2k2](/packages/gacela-project-container)

PHPackages © 2026

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