Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Robo Laravel Package

consolidation/robo

Robo is a modern PHP task runner for automating common development workflows. Define tasks in a RoboFile with a clean OO API to run tests, build assets, deploy, and more. Extensible via plugins, with useful built-in tasks and CLI tooling.

View on GitHub
Deep Wiki
Context7

Base Tasks

Exec

Executes shell script. Closes it when running in background mode.

<?php
$this->taskExec('compass')->arg('watch')->run();
// or use shortcut
$this->_exec('compass watch');

$this->taskExec('compass watch')->background()->run();

if ($this->taskExec('phpunit .')->run()->wasSuccessful()) {
 $this->say('tests passed');
}

?>
  • simulate($context)

  • param $context

  • setProcessInput($input)

  • param resource|string $input

  • dir($dir)

  • param string $dir

  • arg($arg)

  • param string $arg

  • args($args)

  • param string|string[] $args

  • rawArg($arg)

  • param string $arg

  • option($option, $value = null, $separator = null)

  • param string $option

  • options(array $options, $separator = null)

  • param array $options

  • optionList($option, $value = null, $separator = null)

  • param string $option

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

ExecStack

Execute commands one by one in stack. Stack can be stopped on first fail if you call stopOnFail().

<?php
$this->taskExecStack()
 ->stopOnFail()
 ->exec('mkdir site')
 ->exec('cd site')
 ->run();

?>
  • executable($executable)

  • param string $executable

  • exec($command)

  • param string|string[]|CommandInterface $command

  • stopOnFail($stopOnFail = null)

  • param bool $stopOnFail

  • result($result)

  • param $result

  • setProcessInput($input)

  • param resource|string $input

  • dir($dir)

  • param string $dir

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

ParallelExec

Class ParallelExecTask

<?php
$this->taskParallelExec()
  ->process('php ~/demos/script.php hey')
  ->process('php ~/demos/script.php hoy')
  ->process('php ~/demos/script.php gou')
  ->run();
?>
  • process($command)

  • param string|\Robo\Contract\CommandInterface $command

  • waitInterval($waitInterval)

  • param int $waitInterval

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

SymfonyCommand

Executes Symfony Command

<?php
// Symfony Command
$this->taskSymfonyCommand(new \Codeception\Command\Run('run'))
     ->arg('suite','acceptance')
     ->opt('debug')
     ->run();

// Artisan Command
$this->taskSymfonyCommand(new ModelGeneratorCommand())
     ->arg('name', 'User')
     ->run();
?>
  • arg($arg, $value)

  • param string $arg

  • opt($option, $value = null)

  • param $option

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

Watch

Runs task when specified file or dir was changed. Uses Lurker library. Monitor third parameter takes Lurker filesystem events types to watch. By default its set to MODIFY event.

<?php
$this->taskWatch()
     ->monitor(
         'composer.json',
         function() {
             $this->taskComposerUpdate()->run();
         }
     )->monitor(
         'src',
         function() {
             $this->taskExec('phpunit')->run();
         },
         \Lurker\Event\FilesystemEvent::ALL
     )->monitor(
         'migrations',
         function() {
             //do something
         },
         [
             \Lurker\Event\FilesystemEvent::CREATE,
             \Lurker\Event\FilesystemEvent::DELETE
         ]
     )->run();
?>

Pass through the changed file to the callable function

$this
 ->taskWatch()
 ->monitor(
     'filename',
     function ($event) {
         $resource = $event->getResource();
         ... do something with (string)$resource ...
     },
     FilesystemEvent::ALL
 )
 ->run();

The $event parameter is a standard Symfony file resource object

  • monitor($paths, $callable, $events = null)

  • param string|string[] $paths

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/command-executor-lib
tagixo/document-builder
tagixo/page-builder
tagixo/mail-builder
tagixo/form-builder
primix/primix
tagixo/core
alesima/laravel-azure-service-bus
tomshaw/shopcart
likyly/laravel
darthsoup/shoppingcart
tdt/core
labyrinthe/connect-php
encore2/laravel-admin2
cboxdk/laravel-console-kit
shapecode/doctrine-dbal-datetimeutc
gilads-otiannoh254/inertia-protocol
dakiquang/laravel-oauth-refresh-lock
woda/laravel-worktrees
dalefranks/ramasite