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.
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).
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:
parallel.yaml: tasks: {analysis: ["rector", "phpstan"], tests: ["phpunit --no-debug", "phpunit --test-suffix=Feature"]}PARALLEL_JOB_SIZE) to control concurrency.parallel:run as a job step, and combine with tools like GitHub Actions strategy.matrix for layered parallelism.pcntl_fork, so ensure pcntl is enabled in your PHP CLI environment (not available on Windows without workarounds).--buffer-output (if available in your version) or wrap commands in >> log.txt 2>&1 for clean logs.--jobs flag or PARALLEL_JOBS env var.-vvv for verbose output to see timing and failures per job.Parallel\Runner from symplify/easy-parallel alternatives (e.g., parallel\parallel), but this package remains useful for CLI-centric, config-based orchestration.How can I help you explore Laravel packages today?