PHPackages                             meandor/stirling-microservice - 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. meandor/stirling-microservice

ActiveLibrary[Framework](/categories/framework)

meandor/stirling-microservice
=============================

A PHP Microservice framework. This can be used as a dependency for commonly used functionalities in a microservice.

0.4.6(3y ago)1237[2 issues](https://github.com/meandor/stirling-microservice/issues)1MITPHPPHP &gt;=8.1

Since Jan 27Pushed 3y agoCompare

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

READMEChangelog (6)Dependencies (1)Versions (20)Used By (1)

Stirling-Microservice
=====================

[](#stirling-microservice)

[![Latest Stable Version](https://camo.githubusercontent.com/6087a38653e621c5558d4f1b2af598af5d1b70a1a7da221e56265ea96cbac2ef/68747470733a2f2f706f7365722e707567782e6f72672f6d65616e646f722f737469726c696e672d6d6963726f736572766963652f762f737461626c65)](https://packagist.org/packages/meandor/stirling-microservice)[![Total Downloads](https://camo.githubusercontent.com/087a8ddfbae0dae6ed86360d92baae5389ca615b071870b38c40f87620be26e2/68747470733a2f2f706f7365722e707567782e6f72672f6d65616e646f722f737469726c696e672d6d6963726f736572766963652f646f776e6c6f616473)](https://packagist.org/packages/meandor/stirling-microservice)[![Latest Unstable Version](https://camo.githubusercontent.com/0f1edf93bc2fdebed5fc7c691f416d5ac5e5db32e8f3cb27bddeaafdef267853/68747470733a2f2f706f7365722e707567782e6f72672f6d65616e646f722f737469726c696e672d6d6963726f736572766963652f762f756e737461626c65)](https://packagist.org/packages/meandor/stirling-microservice)[![License](https://camo.githubusercontent.com/8ae6284cc51c199bceb8096b3ecaca840c1d25dac108dd62882f568d4e374e11/68747470733a2f2f706f7365722e707567782e6f72672f6d65616e646f722f737469726c696e672d6d6963726f736572766963652f6c6963656e7365)](https://packagist.org/packages/meandor/stirling-microservice)[![Monthly Downloads](https://camo.githubusercontent.com/6403da9da8071dfc3e6a49949e19ec73d52921fafc45ae91cc9a375cbe0ef454/68747470733a2f2f706f7365722e707567782e6f72672f6d65616e646f722f737469726c696e672d6d6963726f736572766963652f642f6d6f6e74686c79)](https://packagist.org/packages/meandor/stirling-microservice)[![Daily Downloads](https://camo.githubusercontent.com/639854d75b54910f10a7fde7149c208ac82c43e78d26475d54c46e5865d31b02/68747470733a2f2f706f7365722e707567782e6f72672f6d65616e646f722f737469726c696e672d6d6963726f736572766963652f642f6461696c79)](https://packagist.org/packages/meandor/stirling-microservice)[![composer.lock](https://camo.githubusercontent.com/27930f3a9202e1f3ccf33792044855c749e3c876ed5db1b2811d2de9459cd9aa/68747470733a2f2f706f7365722e707567782e6f72672f6d65616e646f722f737469726c696e672d6d6963726f736572766963652f636f6d706f7365726c6f636b)](https://packagist.org/packages/meandor/stirling-microservice)[![Build Status](https://camo.githubusercontent.com/f053567a5f4e0871925eab27b9e777cefbd6ccb208c387c0eb4a7bfd7b5231b4/68747470733a2f2f7472617669732d63692e6f72672f6d65616e646f722f737469726c696e672d6d6963726f736572766963652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/meandor/stirling-microservice)

A PHP microservice named after the super famous inventor of the stirling engine.

It is not very effective, but its moving!

Tools
-----

[](#tools)

The main script to do everything is

```
./bin/go
```

To see a list of arguments:

```
./bin/go help
```

To execute all tests:

```
./bin/go test
```

Usage
-----

[](#usage)

Add this library as a composer dependency and require the composer autoloader. In your index.php simply put:

```
Router::init();

Router::run();
```

This will start the Router. If you want to add routes place this in between the init and run:

```
Router::add('info', function () {
    phpinfo();
});
```

This would add the php info page under `http:///info`

Config
------

[](#config)

You can define global config parameters by adding a file called `default.json` into a resources folder on your path root (where your index.php file should be).

To access your config parameters use the Config class.

### Example

[](#example)

default.json content (placed in root folder):

```
{
    "foo": "bar"
}
```

Calling

```
use Stirling\Core\Config;

$config = Config::instance();
echo $config->foo
```

will output "bar"

You can pass another file name as a string into the static instance method of Config if you want to use another config json file.

Status
------

[](#status)

Under `http:///status` you can take a look at the app status. It aggregates registered status functions.

**!important!** By default the complete config will be exposed in the status page. So it is generally advised to password protect the status page in production. To do so just add a `maintenanceUser` and `maintenancePassword` with corresponding values in the config json. This will add basic authentication to internal maintenance pages.

To register a new status:

```
$status = AppStatus::instance();
$status->registerStatus("status 1", "Descriptive message for this status", function () {
    return true;
});
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity71

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

Recently: every ~123 days

Total

19

Last Release

1096d ago

PHP version history (4 changes)0.1.0PHP ^7.0

0.3.3PHP ^7.3

0.4.2PHP &gt;=7.3

0.4.3PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4395138?v=4)[Daniel Schruhl](/maintainers/meandor)[@meandor](https://github.com/meandor)

---

Top Contributors

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

---

Tags

composermicroservicephpphp-microservice

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/meandor-stirling-microservice/health.svg)

```
[![Health](https://phpackages.com/badges/meandor-stirling-microservice/health.svg)](https://phpackages.com/packages/meandor-stirling-microservice)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M829](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[pinguo/php-msf

Pinguo Micro Service Framework For PHP

1.7k4.2k](/packages/pinguo-php-msf)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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