rubenvanerk / laravel-parallel-console-tasks
Run tasks in parallel in console commands
0.1.1
2023-02-01 08:07 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^9.0 || ^10.0
- spatie/fork: ^1.1
- spatie/laravel-package-tools: ^1.13.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-12-09 10:56:59 UTC
README
A simple trait to run Laravel Zero-like tasks in parallel.
Installation
You can install the package via composer:
composer require rubenvanerk/laravel-parallel-console-tasks
Usage
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use RubenVanErk\LaravelParallelConsoleTasks\RunsParallelTasks; class Tasks extends Command { use RunsParallelTasks; // ... public function handle() { $this->tasks([ 'Task 1' => function () { // Do a thing return true; }, 'Task 2' => function () { // Do another thing in parallel return true; }, ]); } }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.