Download the PHP package ttpryg/queue without Composer
On this page you can find all versions of the php package ttpryg/queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package queue
Ttpryg Queue Core
ttpryg/queue is a lightweight, high-performance, framework-agnostic queue management library for PHP 8.1+.
It provides a unified queue interface with support for Database (via PDO or custom adapters) and Symfony Messenger backends.
Features
- Framework Agnostic: Zero dependency on any full-stack framework. Works seamlessly in Native PHP, Slim Framework, CodeIgniter 4, Laravel, or custom CLI scripts.
- Database Handler: Out-of-the-box
PdoDatabaseAdapterfor MySQL/MariaDB, PostgreSQL, and SQLite. - Symfony Messenger Support: Native integration for Symfony Messenger transports (Sync, AMQP, Redis, etc.).
- PSR Standard Compliant:
- PSR-3: Logger interface for structured logging.
- PSR-14: Event dispatcher interface for queue lifecycle hooks (
job.pushed,job.processing,job.failed,worker.started, etc.).
- CLI Management: Includes
symfony/consolecommands for running workers, clearing queues, retrying failed jobs, and flushing history. - Advanced Job Control: Supports job priorities, delayed execution, retry attempts, backoff, and memory limits.
Installation
Add ttpryg/queue to your composer.json:
Quick Start
1. Database Setup
Create the jobs table in your database (e.g. MySQL/MariaDB):
2. Creating a Job Class
Jobs extend Ttpryg\Queue\BaseJob:
3. Dispatching Jobs (Native PHP / Slim Framework)
Initialize the queue manager using the PdoDatabaseAdapter:
Delayed Jobs & Priorities
4. Running Queue Workers (CLI Script)
Create a CLI entry script bin/queue in your project:
Run worker from shell:
Custom Architecture Adapters
To integrate ttpryg/queue with custom database connections or framework event loops, implement the contracts:
Ttpryg\Queue\Contracts\DatabaseAdapterInterface: Implement to use custom query builders (e.g. CodeIgniter 4 Query Builder, Doctrine DBAL, Eloquent).Ttpryg\Queue\Contracts\EventDispatcherInterface: Implement to bridge events to custom event engines (e.g. CodeIgniter Events, Symfony EventDispatcher, Laravel Events).
License
This project is open-source software licensed under the MIT License.
All versions of queue with dependencies
psr/log Version ^1.0|^2.0|^3.0
psr/event-dispatcher Version ^1.0
symfony/messenger Version ^6.0|^7.0
symfony/console Version ^6.0|^7.0