PHPackages                             mugonat/service-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mugonat/service-container

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mugonat/service-container
=========================

This is a simple container service

1.0.1(1y ago)0811↑33.3%1proprietaryPHP

Since Feb 16Pushed 1y agoCompare

[ Source](https://github.com/mugonat-systems/php-service-container)[ Packagist](https://packagist.org/packages/mugonat/service-container)[ RSS](/packages/mugonat-service-container/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (2)Used By (1)

Basic Service Container
=======================

[](#basic-service-container)

### Resolve dependencies like a pro

[](#resolve-dependencies-like-a-pro)

```
// Old way, DON'T DO THIS
$instance = new User(new Mail(new MailSender()));
$instance->sendMail("alex (Using old instantiation)");

// New way, cool way
$instance = dependency(User::class);
$instance->sendMail("alex (Using dependency helper)");
```

You can find the full example [here](./example/index.php)

### Installation

[](#installation)

Inside `composer.json` add this:

```
{
  // other composer things
  "minimum-stability": "dev",
  "prefer-stable": true,
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/mugonat-systems/php-service-container"
    }
  ]
}
```

Then run

```
composer require mugonat/service-container
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance43

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

456d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e270292643f0d9a467ac1010400d65143f8104b15eaafc4bdbb29d16efaa12d6?d=identicon)[joechark](/maintainers/joechark)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[pharmaintelligence/hl7

HL7 PHP Library.

23200.4k](/packages/pharmaintelligence-hl7)[magepow/layerednav

Magento 2 Advanced Layered Navigation Ajax

1712.1k](/packages/magepow-layerednav)

PHPackages © 2026

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