PHPackages                             alireza-h/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. alireza-h/service-container

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

alireza-h/service-container
===========================

PHP service container

17PHP

Since Jan 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/alireza-h/service-container)[ Packagist](https://packagist.org/packages/alireza-h/service-container)[ RSS](/packages/alireza-h-service-container/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

service-container
=================

[](#service-container)

### PHP service container

[](#php-service-container)

#### Installation

[](#installation)

```
$ composer require alireza-h/service-container

```

Register service

```
ServiceContainer::getInstance()
            ->register(AuthService::class)
            ->register(RouteCollection::class)
            ->register(RequestContext::class)
            ->register(UrlService::class, null, [RouteCollection::class, RequestContext::class]);

```

Access to registered service

```
ServiceContainer::getInstance()
            ->service(AuthService::class);

ServiceContainer::getInstance()
            ->service(UrlService::class);

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5dee77bd635b2fdb405f515647c431807615947d166559a001d30827218f1b4?d=identicon)[alireza-h](/maintainers/alireza-h)

---

Top Contributors

[![alireza-h](https://avatars.githubusercontent.com/u/11046660?v=4)](https://github.com/alireza-h "alireza-h (4 commits)")

### Embed Badge

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

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

###  Alternatives

[srchea/php-push-web-socket

Lightweight PHP WebSocket server handling several clients.

13410.2k](/packages/srchea-php-push-web-socket)[gggeek/polyfill-pinba

A pure-php implementation of the API exposed by the native Pinba extension

212.5k](/packages/gggeek-polyfill-pinba)

PHPackages © 2026

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