PHPackages                             hellofresh/tactician-service-provider - 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. hellofresh/tactician-service-provider

AbandonedArchivedLibrary[Framework](/categories/framework)

hellofresh/tactician-service-provider
=====================================

Silex tactician service provider

v2.1.1(9y ago)0329[2 PRs](https://github.com/hellofresh/tactician-service-provider/pulls)MITPHPPHP &gt;=5.5.9

Since Mar 26Pushed 2y ago3 watchersCompare

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

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

Tactician Service Provider
--------------------------

[](#tactician-service-provider)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2832d91286f860b8d343c8d54b0da6646a43a1e0db8db74cbd345e77f45eb9cf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f41747269656465732f74616374696369616e2d736572766963652d70726f76696465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Atriedes/tactician-service-provider/?branch=master) [![Build Status](https://camo.githubusercontent.com/962f87a9e682b0997a0aa20edf816020f49cae1b55e4462c455f4e3481f0ced7/68747470733a2f2f7472617669732d63692e6f72672f41747269656465732f74616374696369616e2d736572766963652d70726f76696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Atriedes/tactician-service-provider)

Provides Tactician as service to Pimple or Silex Container

### Requirements

[](#requirements)

- PHP &gt;= 5.5
- Silex &gt;= 2.0
- Pimple &gt;= 3.0

### Installation

[](#installation)

`composer require jowy/tactician-service-provider`

### Usage

[](#usage)

#### Register tactician service provider

[](#register-tactician-service-provider)

```
$app->register(
    new TacticianServiceProvider(
        [
            'tactician.inflector' => 'class_name',
            'tactician.middleware' =>
                [
                    new LockingMiddleware()
                ]
       ]
   )
);
```

#### Register command handler in DIC

[](#register-command-handler-in-dic)

Handler must registered in container and use `FQCN` as service id

```
$app[HandlerClass::class] = function() {
    return new HandlerClass();
};
```

#### Map command and handler

[](#map-command-and-handler)

after tactician commadn bus service provider registered, you can map command and handler

```
$app['tactician.locator']->addHandler(CommandClass::class, HandlerClass:class);
```

#### Dispatching Command

[](#dispatching-command)

```
$command = new CommandClass('param');

$container['tactician.command_bus']->handle($command)
```

### Options

[](#options)

#### Inflector

[](#inflector)

- class\_name
- class\_name\_without\_suffix
- handle
- invoke

For more information for choosing `Inflector` please refer to [this documentation](http://tactician.thephpleague.com/tweaking-tactician/)

#### Middleware

[](#middleware)

Middleware can be added while tactician service registered was registered.

```
$app->register(
    new TacticianServiceProvider(
        [
            'tactician.inflector' => 'class_name',
            'tactician.middleware' =>
                [
                    new LockingMiddleware(),
                    new SomeMiddleware(),
                    new OtherMiddleware()
                ]
        ]
    )
);
```

Optionally lazy initialization for middleware is possible by using this method

```
$app[LockingMiddleware::class] = function () {
    return new LockingMiddleware();
};

$app->register(
    new TacticianServiceProvider(
        [
            'tactician.inflector' => 'class_name',
            'tactician.middleware' =>
                [
                    LockingMiddleware::class;
                ]
        ]
    )
);
```

### License

[](#license)

MIT, see LICENSE

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

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

Recently: every ~30 days

Total

11

Last Release

3611d ago

Major Versions

v1.0.4 → v2.0.0-beta12016-02-20

v1.1.0 → v2.0.02016-02-22

PHP version history (3 changes)v1.0.0PHP &gt;=5.5

v2.0.0-beta1PHP ~5.5

v2.1.1PHP &gt;=5.5.9

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

wiz-unknown

### Embed Badge

![Health badge](/badges/hellofresh-tactician-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/hellofresh-tactician-service-provider/health.svg)](https://phpackages.com/packages/hellofresh-tactician-service-provider)
```

###  Alternatives

[league/tactician-bundle

Bundle to integrate Tactician with Symfony projects

24810.1M18](/packages/league-tactician-bundle)[flint/flint

Enhanced Silex

12167.5k](/packages/flint-flint)[ddesrosiers/silex-annotation-provider

A silex service provider that allows the use of annotations in ServiceControllers.

25246.7k3](/packages/ddesrosiers-silex-annotation-provider)[mikemix/tactician-module

Laminas/Mezzio Module to use the League of Extraordinary Packages' Tactician library - flexible command bus implementation

17156.2k](/packages/mikemix-tactician-module)[php-di/silex-bridge

PHP-DI integration in Silex

2465.4k1](/packages/php-di-silex-bridge)[propel/propel-service-provider

Propel integrationfor Silex.

2625.2k3](/packages/propel-propel-service-provider)

PHPackages © 2026

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