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

Easy Parallel Laravel Package

symplify/easy-parallel

Run PHP tasks in parallel with a simple API. Easy Parallel helps speed up builds and code analysis by distributing work across multiple processes, while keeping output manageable and integration straightforward in existing Symplify and custom tooling.

View on GitHub
Deep Wiki
Context7

Getting Started

Start by installing via Composer: composer require --dev symplify/easy-parallel. This package provides a simple CLI and PHP API to run tasks in parallel—ideal for speeding up CI pipelines, test suites, or script-heavy operations. The first use case is typically parallelizing tests: run ./vendor/bin/parallel phpunit instead of phpunit to leverage multiple CPU cores. Check the README for basic CLI usage and configuration options (parallel.yaml/parallel.neon).

Implementation Patterns

Use the CLI runner for quick parallelization of existing commands without code changes. For custom workflows, extend Symplify\EasyParallel\ProcessFactory to build parallelizable tasks (e.g., running phpstan, rector, or static analysis tools concurrently). Structure your setup like:

  • Define tasks in parallel.yaml: tasks: {analysis: ["rector", "phpstan"], tests: ["phpunit --no-debug", "phpunit --test-suffix=Feature"]}
  • Use environment variables (e.g., PARALLEL_JOB_SIZE) to control concurrency.
  • Integrate with CI by adding parallel:run as a job step, and combine with tools like GitHub Actions strategy.matrix for layered parallelism.

Gotchas and Tips

  • By default, parallel execution uses pcntl_fork, so ensure pcntl is enabled in your PHP CLI environment (not available on Windows without workarounds).
    -STDOUT/ERR output can interleave—use --buffer-output (if available in your version) or wrap commands in >> log.txt 2>&1 for clean logs.
  • The package defaults to 2 workers; tune with --jobs flag or PARALLEL_JOBS env var.
  • When debugging, run with -vvv for verbose output to see timing and failures per job.
  • Tip: For PHP 8.1+, consider the newer Parallel\Runner from symplify/easy-parallel alternatives (e.g., parallel\parallel), but this package remains useful for CLI-centric, config-based orchestration.
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
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
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