PHPackages                             mattjmattj/manioc - 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. mattjmattj/manioc

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

mattjmattj/manioc
=================

An IoC container based on Maybe and Pimple

1.0(11y ago)117BSD-2-ClausePHP

Since Mar 21Pushed 11y ago1 watchersCompare

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

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

Manioc
======

[](#manioc)

[![Build Status](https://camo.githubusercontent.com/bda1b6e014e8b780631dd9a6ebec962dffd4699b8fdb35a1a66d4a93af10f7a7/68747470733a2f2f7472617669732d63692e6f72672f6d6174746a6d6174746a2f6d616e696f632e737667)](https://travis-ci.org/mattjmattj/manioc)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4d30a15e6eb4f965277e375f8f3157d6a81a96f22e8de0c22e9819af19d43f4a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6174746a6d6174746a2f6d616e696f632f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mattjmattj/manioc/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/97d2e94ffc071cecb8dd1880d2f1c20997fff8b286aa525e4a7557e44553fece/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6174746a6d6174746a2f6d616e696f632f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mattjmattj/manioc/?branch=master)

An IoC container based on Maybe and Pimple. Manioc actually directly depends on Pimple 3 and extends it with [Maybe](https://github.com/mattjmattj/maybe).

Installation
============

[](#installation)

with composer

```
composer.phar require mattjmattj/manioc ~1.0

```

Basic usage
===========

[](#basic-usage)

```
use Manioc\Container;
[...]

$container = new Container();

// A Manioc container is a Pimple 3 container
$container['feature.foo.enabled'] = false;

$container['Cache'] = function($c) {
	new Cache();
}

// ...but with Maybe! Here we use a feature switch to build an instance of Foo
// and wrap it with Maybe. If feature.foo is disabled, Maybe will provide a fake
// object
$container['Foo'] = $container->maybe('Foo',function($c) {
	if ($c['feature.foo.enabled']) {
		return new Foo();
	}
});

// we can also register factories:
$container['Foo'] = $container->maybeFactory('Foo',function($c) {
	if ($c['feature.foo.enabled']) {
		return new Foo();
	}
});
```

License
=======

[](#license)

Manioc is licensed under BSD-2-Clause license.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

4077d ago

### Community

Maintainers

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

---

Top Contributors

[![mattjmattj](https://avatars.githubusercontent.com/u/1842012?v=4)](https://github.com/mattjmattj "mattjmattj (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mattjmattj-manioc/health.svg)

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

###  Alternatives

[ckfinder/ckfinder-laravel-package

CKFinder 3 package for Laravel

159497.2k48](/packages/ckfinder-ckfinder-laravel-package)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)[ckfinder/ckfinder-symfony-bundle

CKFinder bundle for Symfony

42435.7k](/packages/ckfinder-ckfinder-symfony-bundle)[inpsyde/wp-app-container

DI Container and related tools to be used at website level.

41253.5k](/packages/inpsyde-wp-app-container)[rockettheme/toolbox

RocketTheme Toolbox Library

22526.9k3](/packages/rockettheme-toolbox)[rochamarcelo/cake-pimple-di

A cakephp plugin for dependency injection based on Pimple library

12176.8k](/packages/rochamarcelo-cake-pimple-di)

PHPackages © 2026

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