PHPackages                             connectholland/tactician-prioritycommand-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. [Queues &amp; Workers](/categories/queues)
4. /
5. connectholland/tactician-prioritycommand-plugin

AbandonedArchivedLibrary[Queues &amp; Workers](/categories/queues)

connectholland/tactician-prioritycommand-plugin
===============================================

Tactician plugin that allows adding a priority to a command which influences when and in what order commands will be executed

0.2.0(10y ago)316.5k↑50%MITPHP

Since Aug 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ConnectHolland/tactician-prioritycommand-plugin)[ Packagist](https://packagist.org/packages/connectholland/tactician-prioritycommand-plugin)[ RSS](/packages/connectholland-tactician-prioritycommand-plugin/feed)WikiDiscussions master Synced 3w ago

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

tactician-prioritycommand-plugin
================================

[](#tactician-prioritycommand-plugin)

Tactician plugin that allows adding a priority to a command which influences when and in what order commands will be executed

[![Build Status](https://camo.githubusercontent.com/b3f3f1ee86ebcaeb9b2076c7dd938566a2a4bb05c90f23440d114ca8aefd1872/68747470733a2f2f7472617669732d63692e6f72672f436f6e6e656374486f6c6c616e642f74616374696369616e2d7072696f72697479636f6d6d616e642d706c7567696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ConnectHolland/tactician-prioritycommand-plugin)[![Coverage Status](https://camo.githubusercontent.com/dc6b7bc6988bdeac4ffe4699110aaf718fd23830a06377d04445d2e75e6d4687/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f526f6e526164656d616b65722f74616374696369616e2d7072696f72697479636f6d6d616e642d706c7567696e2f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/RonRademaker/tactician-prioritycommand-plugin?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/471e9cc3cf69ec63cb5295ce64b3138760b2e51cec3e50aaac0bbf36ef477c88/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33653866306636642d343364332d343736312d616537352d3134343631323634623864662f6d696e692e706e67)](https://insight.sensiolabs.com/projects/3e8f0f6d-43d3-4761-ae75-14461264b8df)[![Latest Stable Version](https://camo.githubusercontent.com/80f9171da7483583ad254f1cc630a34dfc3204a5dd33b0a0ba0508cc29a78ed9/68747470733a2f2f706f7365722e707567782e6f72672f636f6e6e656374686f6c6c616e642f74616374696369616e2d7072696f72697479636f6d6d616e642d706c7567696e2f762f737461626c65)](https://packagist.org/packages/connectholland/tactician-prioritycommand-plugin)[![Total Downloads](https://camo.githubusercontent.com/70e54cf93a6e56e6a8c1be9ba44a256300ccfe362e842609ab783fa1507f09df/68747470733a2f2f706f7365722e707567782e6f72672f636f6e6e656374686f6c6c616e642f74616374696369616e2d7072696f72697479636f6d6d616e642d706c7567696e2f646f776e6c6f616473)](https://packagist.org/packages/connectholland/tactician-prioritycommand-plugin)[![Latest Unstable Version](https://camo.githubusercontent.com/912a32fd198e026333275611a91cc4742a46b0ff10746db4af60861207ae7d1f/68747470733a2f2f706f7365722e707567782e6f72672f636f6e6e656374686f6c6c616e642f74616374696369616e2d7072696f72697479636f6d6d616e642d706c7567696e2f762f756e737461626c65)](https://packagist.org/packages/connectholland/tactician-prioritycommand-plugin)[![License](https://camo.githubusercontent.com/7d037bf52812ae122cfbdc96dd7d7637221195a7ef62cb75c2993cd5a135237e/68747470733a2f2f706f7365722e707567782e6f72672f636f6e6e656374686f6c6c616e642f74616374696369616e2d7072696f72697479636f6d6d616e642d706c7567696e2f6c6963656e7365)](https://packagist.org/packages/connectholland/tactician-prioritycommand-plugin)

Concept
=======

[](#concept)

The plugin adds Middleware that allows you to prioritize your commands. To give priority to a command let it extend from one of the command implementations in this library:

Default supported command types:

- AbstractRequestCommand (bus, you may take a detour, but you may not start a new round)
- AbstractSequenceCommand (bus, you may take a detour, but nobody gets off before I do)
- AbstractUrgentCommand (take me to my destination asap)

You can create an interface to your event dispatcher (one for symfony ships with this library). You should attach the PriorityMiddleware::REQUEST queue to some event you always dispatch, preferably after output is sent to your users.

Suggested priorities
====================

[](#suggested-priorities)

Obviously you're free to give your commands any priority you like, but these guidelines may help:

- Urgent: anything that affects the output you send to your user OR anything that affects the behavior of incoming request
- Request: anything that affects any subsequent requests from your user
- Sequence: anything that affects the behavior of following commands (i.e. because it sets an id in your database something else depends on)

Issues
======

[](#issues)

Commands are not executed immediately which makes it impossible to return values. If you rely on the return value of a command, you can't make that command a priority command without breaking your application. The fix for this is to add an event listener before putting the command on the bus and dispatching an event from the handler which passes the return value. Example, code with return value

```
$result = $commandbus->handle($command);
echo "The result is.... {$result}";

```

Without the return value:

```
$eventdispatcher->addListener('when_my_commandhandler_is_done', function($event) {
    echo "The result is.... {$event->getReturnValue()}";
});
$result = $commandbus->handle($priorityCommand);

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

4

Last Release

3733d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2697738?v=4)[Ron Rademaker](/maintainers/RonRademaker)[@RonRademaker](https://github.com/RonRademaker)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/connectholland-tactician-prioritycommand-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/connectholland-tactician-prioritycommand-plugin/health.svg)](https://phpackages.com/packages/connectholland-tactician-prioritycommand-plugin)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.5M29](/packages/league-geotools)[illuminate/bus

The Illuminate Bus package.

6045.5M504](/packages/illuminate-bus)[concrete5/core

Concrete – an open source content management system.

20163.8k49](/packages/concrete5-core)

PHPackages © 2026

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