Installation Options
There are two ways to install BullMQ PHP:Option 1: Download Release (Recommended)
Download the latest release from the releases page (look forbullmq-php-X.X.X.zip), extract it to your project, and configure Composer:
Option 2: Install from GitHub (Development)
For development or if you want the latest changes, install directly from the repository:Requirements
- PHP: 8.1 or higher
- Redis: 5.0 or higher (6.2+ recommended for best performance)
- Composer: For package management
Dependencies
The package automatically installs the following dependencies:- predis/predis (^2.0) - Redis client for PHP
- ramsey/uuid (^4.7) - UUID generation for job IDs
- rybakit/msgpack (^0.9) - MessagePack serialization for Lua scripts
Verify Installation
Create a simple test file:Redis Setup
BullMQ requires a Redis server:Run Redis Locally
Use a Managed Redis Service
For production, consider using a managed Redis service:Connection Configuration
You can configure Redis connections in several ways:Using Connection Array
Using Redis URI
Sharing a Connection
Common Issues
Redis Connection Errors
If you can’t connect to Redis:- Verify Redis is running:
redis-cli ping(should returnPONG) - Check your connection string has the correct host, port, and credentials
- Ensure your firewall allows connections to the Redis port (default: 6379)
- For remote Redis, verify network connectivity and credentials
Composer Errors
If you encounter Composer errors:- Ensure you’re running PHP 8.1 or higher:
php -v - Update Composer:
composer self-update - Clear Composer cache:
composer clear-cache - Try running with verbose output:
composer install -vvv
Missing Lua Scripts
If you get errors about missing Lua scripts when installing from GitHub:- Ensure you have Node.js and Yarn installed
- Run the build commands from the monorepo root:
Development Setup
For contributing or development:Next Steps
Usage Guide
Learn how to add jobs and manage queues
