PHPackages                             ytake/starch - 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. ytake/starch

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

ytake/starch
============

Dependency Injection Container For PHP

1.0.0(5y ago)08MITPHPPHP ^8.0

Since Apr 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ytake/starch)[ Packagist](https://packagist.org/packages/ytake/starch)[ RSS](/packages/ytake-starch/feed)WikiDiscussions main Synced 1w ago

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

Ytake\\Starch
=============

[](#ytakestarch)

Dependency Injection Container For PHP.
Not Supported Autowiring.

Requirements
------------

[](#requirements)

PHP 8.0 and above.

Installation
------------

[](#installation)

Composer is the recommended installation method.
To add Ytake\\Starch to your project,
add the following to your composer.json then re-run composer:

```
{
  "require": {
    "ytake/starch": "^1.0"
  }
}
```

Run Composer commands using PHP like so:

```
$ composer install
```

or

```
$ composer require ytake/starch
```

Usage
-----

[](#usage)

### First steps

[](#first-steps)

#### Create Class

[](#create-class)

```
interface AnyInterface
{

}
```

```
final class Any implements AnyInterface
{
  // any
}
```

#### Bindings

[](#bindings)

```
use Ytake\Starch\Container;
use Ytake\Starch\Scope;

$container = new Container();
$container->bind(AnyInterface::class)
  ->to(Any::class)
  ->in(Scope::PROTOTYPE);
```

dependencies will be automatically resolved

```
$container->get(AnyInterface::class);
```

### Scopes

[](#scopes)

use the `Ytake\Starch\Scope` class.

const`Ytake\Starch\Scope::PROTOTYPE`single instance`Ytake\Starch\Scope::SINGLETON`prototype instance### Providers

[](#providers)

use Ytake\\Starch\\ProviderInterface.

```
use Ytake\Starch\ProviderInterface;

final class AnyProvider implements ProviderInterface {

  public function get(): AnyInterface {
    return new Any();
  }
}
```

```
$container->bind(AnyInterface::class)
  ->provider(new AnyProvider();
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

1866d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47817f3dd2890864096bd77ee772ec46061432f128988ca23939b0ca486d7bc3?d=identicon)[ytake](/maintainers/ytake)

---

Top Contributors

[![ytake](https://avatars.githubusercontent.com/u/4454078?v=4)](https://github.com/ytake "ytake (7 commits)")

---

Tags

containerPSR-11dependency-injectiondiiocpsr11

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ytake-starch/health.svg)

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

###  Alternatives

[php-di/php-di

The dependency injection container for humans

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

A flexible dependency injection container

20260.4k6](/packages/slince-di)

PHPackages © 2026

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