PHPackages                             xiaker/gourd - 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. [Framework](/categories/framework)
4. /
5. xiaker/gourd

ActiveLibrary[Framework](/categories/framework)

xiaker/gourd
============

Lightweight PHP IoC container

v4.0.0(1y ago)7271MITPHPPHP &gt;=8.2

Since Feb 15Pushed 1y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (3)Versions (10)Used By (0)

Gourd
=====

[](#gourd)

Lightweight PHP IoC container, follow [`PSR-11`](https://www.php-fig.org/psr/psr-11/)

features
--------

[](#features)

- Auto-wiring
- Dependency resolution
- Service Provider

installation
------------

[](#installation)

`composer require xiaker/gourd`

usage
-----

[](#usage)

```
$container = new Xiaker\Gourd\Container;

$container->set(User::class, function () {
    return new User();
});

$container->set('logger', Logger::class);

$user = $container->get(User::class);
...

$logger = $container->get('logger');
...

$logger2 = $container['logger'];
...
```

more
----

[](#more)

see `test case`

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance41

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

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

Recently: every ~675 days

Total

8

Last Release

494d ago

Major Versions

v1.0.2 → v2.0.02017-09-29

v2.0.0 → v3.0.02020-08-13

v3.0.1 → v4.x-dev2025-02-21

PHP version history (2 changes)v3.0.0PHP &gt;=7.0.0

v4.x-devPHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![fatrbaby](https://avatars.githubusercontent.com/u/4350262?v=4)](https://github.com/fatrbaby "fatrbaby (44 commits)")

---

Tags

containeriocioc-containerphpphp-ioc-container

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/xiaker-gourd/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.5k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.4k86.9M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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