PHPackages                             dakujem/sleeve - 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. dakujem/sleeve

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

dakujem/sleeve
==============

Lightweight PSR-11 service container 📦. A trivial extension of Symfony Pimple container.

1.2(1y ago)02.0k3UnlicensePHPPHP &gt;=8.1CI passing

Since Nov 13Pushed 4mo agoCompare

[ Source](https://github.com/dakujem/sleeve)[ Packagist](https://packagist.org/packages/dakujem/sleeve)[ RSS](/packages/dakujem-sleeve/feed)WikiDiscussions trunk Synced today

READMEChangelog (4)Dependencies (2)Versions (6)Used By (3)

Sleeve
======

[](#sleeve)

[![PHP from Packagist](https://camo.githubusercontent.com/91f167c05efc21ebcd4684df51b4f88aa4db8b1eb4dc741e3f191a906a191521/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f64616b756a656d2f736c65657665)](https://camo.githubusercontent.com/91f167c05efc21ebcd4684df51b4f88aa4db8b1eb4dc741e3f191a906a191521/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f64616b756a656d2f736c65657665)[![Coverage Status](https://camo.githubusercontent.com/58074af47d9603e71bfb68331e3a3b9f216ed2c6e1f8e8b8892ef957b532f920/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f64616b756a656d2f736c656576652f62616467652e7376673f6272616e63683d7472756e6b)](https://coveralls.io/github/dakujem/sleeve?branch=trunk)[![Nature Friendly](https://camo.githubusercontent.com/c151a8027e9eaf7550fe079a9661ae486da4042b6a1f85d45184a542493651b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e61747572652532302546302539462538432542332d667269656e646c792532302546302539462539322539412d677265656e)](https://camo.githubusercontent.com/c151a8027e9eaf7550fe079a9661ae486da4042b6a1f85d45184a542493651b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e61747572652532302546302539462538432542332d667269656e646c792532302546302539462539322539412d677265656e)

A lightweight PSR-11 service container.
A trivial extension of [Symfony Pimple container](https://pimple.symfony.com).

> 💿 `composer require dakujem/sleeve`

Sleeve...

- is dead simple
- is PSR-11 compatible
- extends [Pimple](https://github.com/silexphp/Pimple) ([pimple/pimple](https://packagist.org/packages/pimple/pimple)), a simple Dependency Injection Container by Symfony
- only adds a couple of convenience methods (accessors) on top of the original
- works well with [Slim v4](https://github.com/slimphp/Slim)and other micro frameworks and stacks

Usage
-----

[](#usage)

Added on top of Pimple:

- methods `get`, `set`, `has`, `unset`
- magic accessors `__get`, `__set`, `__isset`, `__unset`

Examples:

```
$dic = new Dakujem\Sleeve;

// the following are equivalent
$service = $dic->get('service');    // getter
$service = $dic['service'];         // array accessor
$service = $dic->service;           // magic accessor

// it works for setting services as well
$factory = function(Container $dic) {
               return new Acme\MyService($dic->get('dependency'));
           };
$dic->set('service', $factory);     // setter
$dic['service'] = $factory;         // array accessor
$dic->service = $factory;           // magic accessor
```

Sleeve supports (through Pimple):

- singleton services (global)
- factory services (factories)
- parameters (with protection too)
- extensions (service providers)

📖 For full documentation, read the [Pimple container usage documentation](https://github.com/silexphp/Pimple). It's quite short, in fact.

Testing
-------

[](#testing)

```
composer test

```

Tested for PHP versions 7.1 onwards.

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance65

Regular maintenance activity

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

Established project with proven stability

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

Total

4

Last Release

449d ago

PHP version history (3 changes)1.0.1PHP &gt;= 7

1.1PHP &gt;=7.4

1.2PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bd7fa945013e9c0dcd65693575276bf5fcb9b9de13e1123e9f2c4a0a4c0fb6b?d=identicon)[dakujem](/maintainers/dakujem)

---

Top Contributors

[![dakujem](https://avatars.githubusercontent.com/u/443067?v=4)](https://github.com/dakujem "dakujem (16 commits)")

---

Tags

dependency-injection-containerpimplepsr-11PSR-11pimpledependency injection container

### Embed Badge

![Health badge](/badges/dakujem-sleeve/health.svg)

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

###  Alternatives

[psr/container

Common Container Interface (PHP FIG PSR-11)

10.0k1.0B3.7k](/packages/psr-container)[php-di/php-di

The dependency injection container for humans

2.8k48.9M989](/packages/php-di-php-di)[laminas/laminas-servicemanager

Factory-Driven Dependency Injection Container

15955.1M693](/packages/laminas-laminas-servicemanager)[mrclay/props-dic

Props is a simple DI container that allows retrieving values via custom property and method names

3611.7M3](/packages/mrclay-props-dic)[woohoolabs/zen

Woohoo Labs. Zen DI Container and preload file generator

986.2k](/packages/woohoolabs-zen)

PHPackages © 2026

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