brad-jones/robo-tasks

This package is abandoned and no longer maintained. No replacement package was suggested.

Extra Tasks for the Robo Task Runner - http://robo.li/

v0.3.3 2016-02-25 02:51 UTC

README

Build Status Latest Stable Version Total Downloads License

These are some tasks I have collated from various projects and generalised so I don't have to re invent the wheel for every new project I create.

All tasks are unit tested however there is plenty of room for improvement here so please use with caution.

If you have not come across the PHP Task Runner called Robo, see: http://robo.li/

How to Use:

First up run the following:

composer require brad-jones/robo-tasks

Assuming you already have robo installed, and you have a RoboFile.php.

Method 1: Extend my tasks class like so.

<?php

/*
 * NOTE: I wouldn't normally install robo globally. I use composer to install
 * it for me. However in some cases people still run a global version of robo.
 * Thus we require our local composer autoloader just in case.
 */
require_once(__DIR__.'/vendor/autoload.php');

class RoboFile extends Brads\Robo\Tasks
{
	public function someCommand()
	{
		// now my tasks are available
		$this->taskCreateDb()
			->host('127.0.0.1')
			->user('root')
			->pass('')
			->name('myapp_test')
		->run();
	}
}

Method 2: Import my tasks as needed, like so.

<?php

require_once(__DIR__.'/vendor/autoload.php');

class RoboFile extends Robo\Tasks
{
	// import additional task
	use Brads\Task\CreateDb;

	public function someCommand()
	{
		$this->taskCreateDb()
			->host('127.0.0.1')
			->user('root')
			->pass('')
			->name('myapp_test')
		->run();
	}
}

Developed by Brad Jones - brad@bjc.id.au