2017 © Pedro Pelรกez
 

library task

PHP task runner

image

task/task

PHP task runner

  • Saturday, May 7, 2016
  • by mbfisher
  • Repository
  • 13 Watchers
  • 178 Stars
  • 15,172 Installations
  • PHP
  • 12 Dependents
  • 0 Suggesters
  • 18 Forks
  • 3 Open issues
  • 16 Versions
  • 3 % Grown

The README.md

task/task

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Got a PHP project? Heard of Grunt and Gulp but don't use NodeJS? Task is a pure PHP task runner., (*2)

  • Leverage PHP as a scripting language, and as your platform of choice.
  • Use loads of nice features inspired by Grunt and Gulp (and Phing).
  • Employ Symfony components for effortless CLI goodness.
  • Extend with plugins.

For more information and documentation goto taskphp.github.io, or tweet us at @taskphp., (*3)

Example

<?php

use Task\Plugin;

require 'vendor/autoload.php';

$project = new Task\Project('wow');

$project->inject(function ($container) {
    $container['phpspec'] = new Plugin\PhpSpecPlugin;
    $container['fs'] = new Plugin\FilesystemPlugin;
    $container['sass'] = (new Plugin\Sass\ScssPlugin)
        ->setPrefix('sass');
    $container['watch'] = new Plugin\WatchPlugin;
});

$project->addTask('greet', function () {
    $this->getOutput()->writeln('Hello, World!');
});

$project->addTask('test', ['phpspec', function ($phpspec) {
    $phpspec->command('run')
        ->setFormat('pretty')
        ->setVerbose(true)
        ->pipe($this->getOutput());
}]);

$project->addTask('css', ['fs', 'sass', function ($fs, $sass) {
    fs->open('my.scss')
        ->pipe($sass)
        ->pipe($fs->touch('my.css'));
}]);

$project->addTask('css.watch', ['watch', function ($watch) {
    $watch->init('my.scss')
        ->addListener('modify', function ($event) {
            $this->runTask('css', $this->getOutput());
        })
        ->start();
}]);

return $project;
$> task greet
Hello, World!

$> task test

      Task\Injector

  17  โœ” is initializable
  22  โœ” should call function with services

      Task\Project

  10  โœ” is initializable
  20  โœ” should have a container
  26  โœ” should resolve no dependencies
  32  โœ” should resolve one dependency
  39  โœ” should resolve many dependencies
  50  โœ” should normalize dependencies
  58  โœ” should normalize complex dependencies


2 specs
9 examples (9 passed)
29ms

The Versions

07/05 2016

dev-php7

dev-php7

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

12/08 2014

v0.6.0

0.6.0.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

18/06 2014

dev-master

9999999-dev

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

22/05 2014

v0.5.3

0.5.3.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

22/05 2014

v0.5.2

0.5.2.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

21/05 2014

v0.5.1

0.5.1.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

21/05 2014

v0.5.0

0.5.0.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

16/05 2014

v0.4.1

0.4.1.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

06/05 2014

v0.4.0

0.4.0.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

06/05 2014

v0.3.2

0.3.2.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

04/05 2014

v0.3.1

0.3.1.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

02/05 2014

v0.3.0

0.3.0.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

28/04 2014

v0.2.0

0.2.0.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

25/04 2014

v0.1.2

0.1.2.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

23/04 2014

v0.1.1

0.1.1.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Aran Wilkinson
by Mike Fisher

23/04 2014

v0.1.0

0.1.0.0

PHP task runner

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Fisher