PHPackages                             andreas-weber/php-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. andreas-weber/php-runner

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

andreas-weber/php-runner
========================

Library to simplify the implementation of sophisticated interdependent tasks.

1.2.0(11y ago)35.9k1MITPHPPHP &gt;=5.4

Since Jan 31Pushed 11y agoCompare

[ Source](https://github.com/andreas-weber/php-runner)[ Packagist](https://packagist.org/packages/andreas-weber/php-runner)[ Docs](https://github.com/andreas-weber/php-runner)[ RSS](/packages/andreas-weber-php-runner/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (7)Versions (6)Used By (0)

andreas-weber/php-runner
========================

[](#andreas-weberphp-runner)

[![Build Status](https://camo.githubusercontent.com/5e8da90855bc4655f0ef9d23959d8d35f5caa09a276f45b80578a3107cd2f9d3/68747470733a2f2f7472617669732d63692e6f72672f616e64726561732d77656265722f7068702d72756e6e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/andreas-weber/php-runner)

Library to simplify the implementation of sophisticated interdependent tasks.

Features
--------

[](#features)

- Encapsulate logic in different tasks instead of writing spaghetti code.
- Chain task runners to describe dependencies between tasks.
- Pass a payload to task runner. Payload gets passed from task to task.
- Skip single tasks during runtime by implementing unless() method.
- Use setUp() and tearDown() on each task to prepare and cleanup task execution.
- Call retry() in task to use task runners retry handling.
- Call skip() in task to skip task processing.
- Call fail() in task to fail complete task run.
- Use events to hook in custom logic during task run.

### Events

[](#events)

This library has an internal event system, which you can use to react with custom hooks during execution. The following events are available:

- runner.start
- runner.success
- runner.failure
- runner.task.start
- runner.task.success
- runner.task.failure
- runner.task.retry
- runner.task.skip
- runner.task.unless

Requirements
------------

[](#requirements)

Check shipped composer.json.

Installation
------------

[](#installation)

Simply add a dependency on `andreas-weber/php-runner` to your project's [Composer](http://getcomposer.org/) `composer.json` file.

Examples
--------

[](#examples)

- [Simple Task-Runner](examples/simple/example.php)
- [Task-Runner with retry handling](examples/retry/example.php)
- [Using setUp() and tearDown()](examples/setup-teardown/example.php)
- [Using success callback](examples/success-callback/example.php)
- [Skip task under certain circumstances](examples/unless-skip/example.php)
- [Chain task runners](examples/chain-runners/example.php)
- [Raise exception, when exit code is not zero](examples/exit-code/example.php)

Developer
---------

[](#developer)

### Environment

[](#environment)

Boot:

```
vagrant up

```

Enter virtual machine:

```
vagrant ssh

```

Run tests:

```
cd /vagrant
vendor/bin/phpunit src/Test/

```

### Build targets

[](#build-targets)

```
vagrant@andreas-weber:/vagrant$ ant
Buildfile: /vagrant/build.xml

help:
     [echo]
     [echo] The following commands are available:
     [echo]
     [echo] |   +++ Build +++
     [echo] |-- build                (Run the build)
     [echo] |   |-- dependencies     (Install dependencies)
     [echo] |   |-- tests            (Lint all files and run tests)
     [echo] |   |-- metrics          (Generate quality metrics)
     [echo] |-- cleanup              (Cleanup the build directory)
     [echo] |
     [echo] |   +++ Composer +++
     [echo] |-- composer             -> composer-download, composer-install
     [echo] |-- composer-download    (Downloads composer.phar to project)
     [echo] |-- composer-install     (Install all dependencies)
     [echo] |
     [echo] |   +++ Testing +++
     [echo] |-- phpunit              -> phpunit-full
     [echo] |-- phpunit-tests        (Run unit tests)
     [echo] |-- phpunit-full         (Run unit tests and generate code coverage report / logs)
     [echo] |
     [echo] |   +++ Metrics +++
     [echo] |-- coverage             (Show code coverage metric)
     [echo] |-- phploc               (Show lines of code metric)
     [echo] |-- qa                   (Run quality assurance tools)
     [echo] |-- |-- phpcpd           (Show copy paste metric)
     [echo] |-- |-- phpcs            (Show code sniffer metric)
     [echo] |-- |-- phpmd            (Show mess detector metric)
     [echo] |
     [echo] |   +++ Metric Reports +++
     [echo] |-- phploc-report        (Generate lines of code metric report)
     [echo] |-- phpcpd-report        (Generate copy paste metric report)
     [echo] |-- phpcs-report         (Generate code sniffer metric report)
     [echo] |-- phpmd-report         (Generate mess detector metric report)
     [echo] |
     [echo] |   +++ Tools +++
     [echo] |-- lint                 (Lint all php files)
     [echo]

```

Thoughts
--------

[](#thoughts)

Pull requests are highly appreciated. Built with love. Hope you'll enjoy.. :-)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

4027d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a8b5991f2ce96a615120c6721d212010150778c3371f303be726efd5ddd9915?d=identicon)[andreas-weber](/maintainers/andreas-weber)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/andreas-weber-php-runner/health.svg)

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

###  Alternatives

[chh/pipe

Put your assets into the Pipe and smoke them.

1212.5k1](/packages/chh-pipe)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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