Weave Code
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

Composer Run Parallel Laravel Package

veewee/composer-run-parallel

Run Composer scripts in parallel to speed up builds. composer-run-parallel executes multiple commands concurrently, with clear output and proper exit codes—great for CI pipelines, monorepos, and large projects where sequential scripts are too slow.

View on GitHub
Deep Wiki
Context7

Composer run parallel

This composer plugin allows you to run the tasks inside your composer file in parallel. No more waiting on one specific task!

Please find my blog post describing the whole story.

Installation

composer require --dev veewee/composer-run-parallel

or globally ...

composer require --global veewee/composer-run-parallel

Examples

{
  "scripts": {
    "php1": "@php -r 'sleep(3); echo \"1\";'",
    "php2": "@php -r 'echo \"2\";'"
  }
}

Following command will result in parallel execution of both php1 and php2:

composer run parallel php1 php2

You can even create a shortcut script for the parallel function like this:

{
  "scripts": {
    "php1": "@php -r 'sleep(3); echo \"1\";'",
    "php2": "@php -r 'echo \"2\";'",
    "php1And2": "@parallel php1 php2"
  }
}
composer run php1And2

What if a task fails?

{
  "scripts": {
    "php1": "@php -r 'sleep(3); echo \"1\";'",
    "phpfail": "@php -r 'throw new Exception(\"FAIL\");'"
  }
}

All tasks will be executed and if one fails, the parallel task will fail as well:

composer run parallel php1 phpfail

Succesfully ran:
php1

Failed running:
phpfail

Not all tasks could be executed succesfully!

Note: You can also use the shorthand command:

composer parallel php1 phpfail

Pretty cool right? What If I told you there is even more?!

{
  "scripts": {
    "wicked": [
      "@parallel vendor php2",
      "@php1"
    ]
  }
}

You can even mix parallel tasks with serial tasks and even nest multiple parallel tasks at the same time. This way you can create flows like:

  • do some checks first
  • next run some stuff in parallel
  • finish up with some blocking cleanup task if everything was ok
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation