PHPackages                             nigelgreenway/demander-container-plugin - 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. nigelgreenway/demander-container-plugin

ActiveLib

nigelgreenway/demander-container-plugin
=======================================

A mediator for nigelgreenway/demander using league/container

v0.2.1(10y ago)0846MITPHPPHP &gt;= 5.5

Since Jan 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/NigelGreenway/Demander-Container-Plugin)[ Packagist](https://packagist.org/packages/nigelgreenway/demander-container-plugin)[ RSS](/packages/nigelgreenway-demander-container-plugin/feed)WikiDiscussions master Synced 1mo ago

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

Demander-Container-Plugin
=========================

[](#demander-container-plugin)

[![Latest Version](https://camo.githubusercontent.com/2e90fe12d53440886997ce0414f55291a777746b5db8599638013c6bb9b8fa4b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4e6967656c477265656e7761792f44656d616e6465722d436f6e7461696e65722d506c7567696e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/NigelGreenway/Demander-Container-Plugin/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/4cece209cd2a5b35b5a1035aca644238a3b3e7ad76ce28006ab22e6c125f566d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4e6967656c477265656e7761792f44656d616e6465722d436f6e7461696e65722d506c7567696e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/NigelGreenway/Demander-Container-Plugin)

This is a plugin for [NigelGreenway/Demander](https://github.com/NigelGreenway/Demander), a Command/Query mediator.

This implements the Mediator interfaces and allows [League/Container](https://github.com/ThePHPLeague/Container) to load a Query or Command handler.

Install
-------

[](#install)

Via Composer

```
$ composer require nigelgreenway/demander-container-plugin
```

Usage
-----

[](#usage)

Below is a very basic example on how to use the package. More docs will be released as I get time.

```
$container = new Container(null, null, null);

$container->add(
    RegisteredQueryHandler::class,
    RegisteredQueryHandler::class
)->withArgument('query.test');

$container->add(
    RegisteredCommandHandler::class,
    RegisteredCommandHandler::class
)->withArgument('command.test');

$mediator = new ContainerMediator(
    $container,
    [
        RegisteredQuery::class => RegisteredQueryHandler::class,
    ],
    [
        RegisteredCommand::class => RegisteredCommandHandler::class,
    ]
);

$viewModel = $mediator->request(new RegisteredQuery());
echo $viewModel->test; // test.query

$command = $mediator->execute(new RegisteredCommand());
echo $command; // test.command
```

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Nigel Greenway](https://github.com/NigelGreenway)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

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

Total

3

Last Release

3732d ago

### Community

Maintainers

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

---

Top Contributors

[![NigelGreenway](https://avatars.githubusercontent.com/u/2984008?v=4)](https://github.com/NigelGreenway "NigelGreenway (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nigelgreenway-demander-container-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/nigelgreenway-demander-container-plugin/health.svg)](https://phpackages.com/packages/nigelgreenway-demander-container-plugin)
```

PHPackages © 2026

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