2017 © Pedro Peláez
 

library php-runner

Library to simplify the implementation of sophisticated interdependent tasks.

image

andreas-weber/php-runner

Library to simplify the implementation of sophisticated interdependent tasks.

  • Wednesday, May 13, 2015
  • by andreas-weber
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5,880 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

andreas-weber/php-runner

Build Status, (*1)

Library to simplify the implementation of sophisticated interdependent tasks., (*2)

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

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

  • 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

Check shipped composer.json., (*4)

Installation

Simply add a dependency on andreas-weber/php-runner to your project's Composer composer.json file., (*5)

Examples

Developer

Environment

Boot:, (*6)

vagrant up

Enter virtual machine:, (*7)

vagrant ssh

Run tests:, (*8)

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

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

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

The Versions

13/05 2015

dev-master

9999999-dev https://github.com/andreas-weber/php-runner

Library to simplify the implementation of sophisticated interdependent tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Weber

08/05 2015

1.2.0

1.2.0.0 https://github.com/andreas-weber/php-runner

Library to simplify the implementation of sophisticated interdependent tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Weber

27/04 2015

1.1.0

1.1.0.0 https://github.com/andreas-weber/php-runner

Library to simplify the implementation of sophisticated interdependent tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Weber

12/03 2015

1.0.2

1.0.2.0 https://github.com/andreas-weber/php-runner

Library to simplify the implementation of sophisticated interdependent tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Weber

31/01 2015

1.0.1

1.0.1.0 https://github.com/andreas-weber/php-runner

Library to simplify the implementation of sophisticated interdependent tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Weber

31/01 2015

1.0.0

1.0.0.0 https://github.com/andreas-weber/php-runner

Library to simplify the implementation of sophisticated interdependent tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Weber