PHPackages                             ambimax/php-lib-runner - 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. ambimax/php-lib-runner

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

ambimax/php-lib-runner
======================

1.0.0(3y ago)02.6k↓69.6%MITPHPPHP &gt;=8.0

Since Dec 16Pushed 3w ago1 watchersCompare

[ Source](https://github.com/ambimax/php-lib-runner)[ Packagist](https://packagist.org/packages/ambimax/php-lib-runner)[ Docs](https://ambimax.de)[ RSS](/packages/ambimax-php-lib-runner/feed)WikiDiscussions main Synced 2d ago

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

Ambimax PhpLibrary Runner
=========================

[](#ambimax-phplibrary-runner)

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require ambimax/php-lib-runner
```

Basic Usage
-----------

[](#basic-usage)

A Runner should combine and invoke the different parts of the code just like a command or scheduled task would do.
External variables should get bundled and validated in an ArgumentBag.

### Implementing a ArgumentBag

[](#implementing-a-argumentbag)

[**Detailed Infos**](docs/classes.md#argumentbag)

```
use \Ambimax\Runner\ArgumentBag\ArgumentEnumInterface;
use \Ambimax\Runner\ArgumentBag\ArgumentBagInterface;

/*
 * Implementation
 */
class DemoArgumentBag implements ArgumentBagInterface {

    const DEMO_ARGUMENT_1 = 'demoArgument1';
    const DEMO_ARGUMENT_2 = 'demoArgument2';
    const DEMO_ARGUMENT_3 = 'demoArgument3';

    public function __construct(
        protected string $demoArgument1,
        protected string $demoArgument2
        protected string $demoArgument3,
    ) {
        try {
            $this->validateDemoArgument1($demoArgument1);
        } catch (ArgumentValidationException $exception) {
            $exceptions[] = $exception;
        }

        try {
            $this->validateDemoArgument2($demoArgument2);
        } catch (ArgumentValidationException $exception) {
            $exceptions[] = $exception;
        }

        if ($exceptions) {
            if (count($exceptions) > 1) {
                throw new MultipleArgumentValidationException($exceptions);
            }

            throw $exceptions[0];
        }
    }
    public function getArgument(string $argument)
    {
       return match ($argument) {
            self::$DEMO_ARGUMENT_1 => $this->demoArgument1,
            self::$DEMO_ARGUMENT_2 => $this->demoArgument2,
            self::$DEMO_ARGUMENT_3 => $this->demoArgument3,
       }
    }

    // protected function validateDemoArgument1() {}
    // protected function validateDemoArgument2() {}
}
```

### Implementing a Runner

[](#implementing-a-runner)

[**Detailed Infos**](docs/classes.md#runner)

```
use \Ambimax\Runner\AbstractRunner;
use \Ambimax\Runner\ArgumentBag\ArgumentEnumInterface;

class DemoRunner extends AbstractRunner {
    public function getArgumentBagType(): string
    {
        return DemoArgumentBag::class;
    }

    public function run(): void
    {
        $demo1 = $this->getArgument(DemoArgumentBag::DEMO_ARGUMENT_1);
        $demo2 = $this->getArgument(DemoArgumentBag::DEMO_ARGUMENT_2);
        $demo3 = $this->getArgument(DemoArgumentBag::DEMO_ARGUMENT_3);

        // your code here
    }
}
```

### Usage

[](#usage)

```
$argumentBag = new DemoArgumentBag('example1', 'example2', 'example3');
(new DemoRunner($argumentBag))->run();
```

### Detailed Descriptions

[](#detailed-descriptions)

[See here](docs/classes.md)

Helper scripts
--------------

[](#helper-scripts)

You can find out more about them [here](docs/tools.md).

Addtitional Documentation
-------------------------

[](#addtitional-documentation)

Add a list of links to additional documentation in `./docs`.

- [Changelog](./CHANGELOG.md)
- [Tools](./tools.md)
- [Plugin Template](plugin-template.md)

Author(s)
---------

[](#authors)

- Fabian Köhnen, [ambimax® GmbH](https://www.ambimax.de)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance62

Regular maintenance activity

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

Unknown

Total

1

Last Release

1295d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/42027473?v=4)[Fabian Köhnen](/maintainers/FabianKoehnen)[@FabianKoehnen](https://github.com/FabianKoehnen)

---

Top Contributors

[![FabianKoehnen](https://avatars.githubusercontent.com/u/42027473?v=4)](https://github.com/FabianKoehnen "FabianKoehnen (2 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ambimax-php-lib-runner/health.svg)

```
[![Health](https://phpackages.com/badges/ambimax-php-lib-runner/health.svg)](https://phpackages.com/packages/ambimax-php-lib-runner)
```

###  Alternatives

[lingaro/magento2-codegen

Magento 2 Code Generator

966.5k](/packages/lingaro-magento2-codegen)

PHPackages © 2026

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