PHPackages                             geekish/slimbox - 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. [Framework](/categories/framework)
4. /
5. geekish/slimbox

ActiveLibrary[Framework](/categories/framework)

geekish/slimbox
===============

Slim Framework with Unbox container

0.3.0(9y ago)490MITPHPPHP ^5.6|^7.0

Since Nov 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/geekish/slimbox)[ Packagist](https://packagist.org/packages/geekish/slimbox)[ Docs](https://github.com/geekish/slimbox)[ RSS](/packages/geekish-slimbox/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (0)

Slimbox
=======

[](#slimbox)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5ceda38604e8ec592cbf4a080ee471c6a9c7c72c50333234dd9efdd6a9635106/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765656b6973682f736c696d626f782e7376673f7374796c653d666c61742d737175617265)](//packagist.org/packages/geekish/slimbox)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/c1fa348babf3cbeb45f3cd87669bb7c706a26d80d0c939dd2458e4e478aa5847/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6765656b6973682f736c696d626f782f6d61737465722e7376673f7374796c653d666c61742d737175617265)](//travis-ci.org/geekish/slimbox)[![Coverage Status](https://camo.githubusercontent.com/40493a0780174eaeb8e0cec29f6b362e612e389b19183e2139dce43d1b99f4e2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6765656b6973682f736c696d626f782f62616467652e737667)](//coveralls.io/github/geekish/slimbox)[![Quality Score](https://camo.githubusercontent.com/ea63c6e63a97a3afd18aa4bab0b8f7b567b86ba6c7dd497a854d55a6b1c71c10/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6765656b6973682f736c696d626f782e7376673f7374796c653d666c61742d737175617265)](//scrutinizer-ci.com/g/geekish/slimbox)[![Total Downloads](https://camo.githubusercontent.com/5d2b16e98497e606c931d0d0b217736d3b27b0824b4c867e5a670697084588b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6765656b6973682f736c696d626f782e7376673f7374796c653d666c61742d737175617265)](//packagist.org/packages/geekish/slimbox)

Bringing [mindplay/unbox](//github.com/mindplay-dk/unbox) into [Slim Framework](//github.com/slimphp/Slim).

Install
-------

[](#install)

Via [Composer](//getcomposer.org):

```
composer require geekish/slimbox
```

Usage
-----

[](#usage)

### Service Provider

[](#service-provider)

The most important class in this package is `Geekish\Slimbox\DefaultServicesProvider`. It ensures the same services [required by Slim](https://www.slimframework.com/docs/concepts/di.html#required-services) are available through Unbox. Besides the change in container, it differs from `Slim\DefaultServicesProvider` by registering services under their FQCN first, then registers aliases by their interfaces, and finally the short aliases used by slim (e.g. "router", "foundHandler"). Registering services by their class name enables Unbox to automatically inject them as dependencies as needed by other classes.

The service provider is *not* automatically registered for you, so you need to do this yourself:

```
use Geekish\Slimbox\DefaultServicesProvider;
use mindplay\unbox\ContainerFactory;

$factory = new ContainerFactory;
$factory->add(new DefaultServicesProvider);

$container = $factory->createContainer();
```

### Settings

[](#settings)

Also included is `Geekish\Slimbox\Settings`, which extends from `Slim\Collection`. This class replaces the simple array that Slim registers under "settings" (see: [Slim Default Settings](//www.slimframework.com/docs/objects/application.html#slim-default-settings)).

Settings may be provided via the constructor of the `DefaultServicesProvider`:

```
$factory->add(new DefaultServicesProvider([
    "outputBuffering" => "prepend",
]));
```

Or via the `configure()` method on `ContainerFactory`:

```
$factory->configure(
    Settings::class,
    function (Settings $settings) {
        $settings['displayErrorDetails'] = true;
        return $settings;
    }
);
```

### Container and Container Factory (Optional)

[](#container-and-container-factory-optional)

This package contains an extended (final) Container and ContainerFactory from [Unbox](//github.com/mindplay-dk/unbox). Usage is almost exactly the same as using Unbox directly, except the extended Container *partially* implements [ArrayAccess](http://php.net/manual/en/class.arrayaccess.php). This allows you to use the Container like an array to *access* services; however, due to the fact that Unbox uses a factory class to create the container, you cannot use array notation to set/configure services on the Container.

To use the extended ContainerFactory:

```
use Geekish\Slimbox\ContainerFactory;
use Geekish\Slimbox\DefaultServicesProvider;
use Slim\App;

$factory = new ContainerFactory;
$factory->add(new DefaultServicesProvider([
    "outputBuffering" => "prepend",
]));

$container = $factory->createContainer();
```

Usage of the packaged `Container` and `ContainerFactory` is entirely optional; they are included purely for convenience and consistency with Slim's packaged `Container`. Simply replace `Geekish\Slimbox\ContainerFactory` in the snippet above with `mindplay\unbox\ContainerFactory`.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Hannah Warmbier](//github.com/geekish)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Every ~9 days

Total

3

Last Release

3497d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f71f88eade469052b3394beb105edf22d815cd1449a90bb28ce94eccbd51740?d=identicon)[hannahwarmbier](/maintainers/hannahwarmbier)

---

Top Contributors

[![geekish](https://avatars.githubusercontent.com/u/684339?v=4)](https://github.com/geekish "geekish (31 commits)")

---

Tags

container-interopphpslimslim-frameworkunboxgeekishslimbox

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/geekish-slimbox/health.svg)

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

###  Alternatives

[zubzet/framework

 A lightweight PHP framework focused on rapid development, ease of use, and great portability.

1370.1k1](/packages/zubzet-framework)[vesp/core

Vesp core library to make backend simple

243.9k5](/packages/vesp-core)[duxweb/dux-lite

The lightweight framework based on slim php

161.0k9](/packages/duxweb-dux-lite)

PHPackages © 2026

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