Download the PHP package dalehurley/process-manager without Composer

On this page you can find all versions of the php package dalehurley/process-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package process-manager

PHP Process Manager

Latest Version on Packagist Total Downloads PHP Version Tests

A lightweight parallel process runner for PHP. Execute multiple scripts or commands concurrently with configurable parallelism, timeouts, and real-time output tracking.


Overview

What is it?

PHP Process Manager is a concurrent task runner that spawns and manages multiple OS processes simultaneously. Instead of running tasks one after another (sequential), it executes them in parallel—dramatically reducing total execution time for batch operations.

Think of it as a simple process pool or worker spawner: you queue up scripts, set a concurrency limit, and the manager handles execution, monitoring, timeouts, and result collection.

Who is it for?

Audience Use Case
Backend developers Batch processing, data imports/exports, scheduled jobs
DevOps engineers Deployment scripts, server maintenance, multi-host operations
Data engineers ETL pipelines, file processing, API data collection
QA engineers Parallel test execution, load testing preparation
System administrators Bulk operations, log processing, backup scripts

Why use it?

PHP is single-threaded by default. When you have independent tasks, running them sequentially wastes time:

Scenario Sequential Parallel (5 workers) Speedup
10 API calls × 2s each 20s ~4s
100 file imports × 1s each 100s ~20s
50 email sends × 0.5s each 25s ~5s

This package is ideal when you need to:

When to use it (and when not to)

Good fit:

Consider alternatives for:


Real-World Use Cases

1. Batch Data Import

Import thousands of records by processing files in parallel:

2. Multi-API Data Collection

Fetch data from multiple APIs simultaneously:

3. Image/Video Processing Pipeline

Process media files in parallel using CLI tools:

4. Database Migration Runner

Run independent migrations concurrently:

5. Parallel Test Execution

Run test suites faster:

6. Multi-Server Deployment

Deploy to multiple servers simultaneously:


Features

Requirements

Installation

Via Composer

Manual Installation

Clone the repository and include the autoloader:

Quick Start

Usage

Basic Configuration

Fluent API

Adding Scripts

Output Handlers

The package includes several output handlers:

Custom Output Handler

Implement the OutputHandlerInterface for custom output:

Working with Results

API Reference

ProcessManager

Method Description
setExecutable(string $executable) Set the command to execute
setWorkingDirectory(string $path) Set the working directory
setMaxConcurrentProcesses(int $count) Set max parallel processes
setSleepInterval(int $seconds) Set interval between status checks
setOutputHandler(OutputHandlerInterface $handler) Set the output handler
addScript(string $script, ...) Add a script to the queue
addScripts(array $scripts) Add multiple scripts
getQueueCount() Get number of queued scripts
getRunningCount() Get number of running processes
clearQueue() Clear the script queue
run() Execute all queued scripts

ProcessResult

Property Type Description
script string Script name
exitCode int Process exit code
output string stdout content
errorOutput string stderr content
elapsedTime int Execution time in seconds
wasKilled bool Whether process was killed
wasSuccessful bool Whether process succeeded

Upgrading from v1.x

The 2.0 release is a complete rewrite with breaking changes:

Key Changes

Testing

Run the test suite with PHPUnit:

Run static analysis with PHPStan (level 8):


Alternatives

This package is intentionally simple and lightweight. Depending on your needs, consider these alternatives:

For More Complex Process Management

Package Description Best For
symfony/process Full-featured process component Single process with advanced I/O handling
spatie/async Asynchronous process handling with Pool Similar use case with event-driven API
amphp/parallel True parallel execution with workers High-performance async applications

For Queue-Based Processing

Package Description Best For
Laravel Queues Queue system with multiple backends Laravel applications, distributed workers
Symfony Messenger Message bus with queue transport Symfony applications, event-driven
php-enqueue Framework-agnostic queue abstraction Multi-backend queue support
Beanstalkd + Pheanstalk Lightweight job queue Simple job queuing

For True Multi-Threading

Package Description Best For
parallel PHP extension for parallel execution Shared memory, true threading (requires ZTS PHP)
pthreads Threading extension (PHP 7 only) Legacy threading needs

When to Choose This Package

Choose PHP Process Manager when you need:

Choose alternatives when you need:


License

MIT License. See LICENSE for details.

Credits


All versions of process-manager with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-pcntl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dalehurley/process-manager contains the following files

Loading the files please wait ...