PHPackages                             district5/service-dispatch-helper - 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. district5/service-dispatch-helper

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

district5/service-dispatch-helper
=================================

District5 Service Dispatcher Library

2.0.0(2y ago)099mitPHPPHP &gt;=7.4

Since Oct 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/district-5/php-service-dispatch-helper)[ Packagist](https://packagist.org/packages/district5/service-dispatch-helper)[ Docs](https://github.com/district-5/php-service-dispatch-helper)[ RSS](/packages/district5-service-dispatch-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Service Dispatch Helper
=======================

[](#service-dispatch-helper)

### About

[](#about)

This library is designed to facilitate a microservice architecture that is split using subdomains whilst keeping instance costs down during development / early stage. It allows you to split your application into microservices while running them within the same containerised images (or for example within the same GCP App Engine instance).

### Installing

[](#installing)

This library requires no other libraries.

- Require in your composer
    - `"district5/service-dispatch-helper": "*"`

### Usage

[](#usage)

When calling the helper function, you should pass it the base domain name you are working on that all the subdomains hang from. For example, if our domains are `api.district5.co.uk` and `www.district5.co.uk`, we want `api-service` to map to the api microservice, and `web-service` to map to the main app. This could be achieved with the following:

```
$baseDomain = 'd5.gs';
$serviceMap = [
        'api' => 'api-service',
        'www' => 'web-service'
    ];

$selector = new \District5\ServiceDispatch\ServiceSelector($serviceMap);
$service = $selector->getServiceFromServerSubdomain('district5.co.uk');
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

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

Recently: every ~316 days

Total

7

Last Release

754d ago

Major Versions

0.0.2 → 1.0.02020-10-27

1.1.1 → 2.0.02024-04-15

PHP version history (2 changes)0.0.1PHP &gt;=7.1

2.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/5de4b9a90eadf6b595e1b5efc802683f2358da5661c616820b90c922f8aa8e05?d=identicon)[rogerthomas84](/maintainers/rogerthomas84)

![](https://www.gravatar.com/avatar/c566343bfe6b0a3602622dd1def882992f10ff114b6a95ffb000da2ba9e22578?d=identicon)[mark-morgan](/maintainers/mark-morgan)

---

Top Contributors

[![mark-morgan](https://avatars.githubusercontent.com/u/1934581?v=4)](https://github.com/mark-morgan "mark-morgan (12 commits)")

---

Tags

phpdistrict5service-dispatch-helper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/district5-service-dispatch-helper/health.svg)

```
[![Health](https://phpackages.com/badges/district5-service-dispatch-helper/health.svg)](https://phpackages.com/packages/district5-service-dispatch-helper)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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