Download the PHP package onlyphp/simple-queue without Composer
On this page you can find all versions of the php package onlyphp/simple-queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download onlyphp/simple-queue
More information about onlyphp/simple-queue
Files in onlyphp/simple-queue
Package simple-queue
Short Description A powerful and flexible job processing system for PHP applications, supporting both CodeIgniter 3 and Laravel frameworks. This package allows you to easily dispatch jobs with various types of processing, including closures, static class methods, object methods, global functions, and invokable classes.
License MIT
Informations about the package simple-queue
PHP Simple Queue
A framework-agnostic queue system for PHP that seamlessly integrates with multiple database systems and frameworks. This package offers Laravel-inspired queue functionality without the need for cron jobs, enabling you to effortlessly dispatch jobs with various processing types, including closures, static class methods, object methods, global functions, and invokable classes. This package supports databases such as PDO, MySQL, MSSQL, Oracle and is compatible with CodeIgniter 3, CodeIgniter 4, and Laravel framework.
⚠️ Warning
DO NOT USE THIS PACKAGE.
This package is under active development and may contain critical bugs. It is primarily intended for personal use and testing within my own projects.
This version has not undergone rigorous testing and may be unstable or unreliable.
🛠️ Primary Focus (Testing & Development):
- CodeIgniter 3
⏭️ Supported (Experimental):
- PDO
- MySQL
- MSSQL
- Oracle
- CodeIgniter 4
- Laravel
✨ Features
- 🚀 No cron jobs required - automatic worker process management
- 🔄 Automatic table creation and management
- 💪 Multiple database support (PDO, MySQL, MSSQL, Oracle, CodeIgniter 3/4, Laravel)
- ⚡ Priority queues (urgent, high, normal, low)
- 🔁 Automatic retry mechanism with customizable attempts
- ⏱️ Job timeout handling
- 📊 Job status monitoring
- 🔍 Failed job handling
📝 Requirements
- PHP >= 8.0
🔧 Installation
Install via Composer:
🚀 Basic Usage
Initialize with Different Databases
🖥️ Priority Levels
urgent
: Highest priorityhigh
: High prioritynormal
: Default prioritylow
: Low priority
🎯 Examples
Simple Jobs
Advanced Jobs
1. Email Processing Queue
2. File Processing Queue
3. Order Processing System
4. Data Export Jobs
5. Image Processing Queue
6. Calling global function without classes
7. Invokable Classes
⚙️ Configuration Options
📊 Monitoring and Management
📅 Database Tables
The package automatically creates two tables:
jobs
- Stores queue jobsfailed_jobs
- Stores failed job information
👍 Best Practices
- Job Naming: Always set meaningful names for jobs using
setName()
for better tracking. - Timeouts: Set appropriate timeouts based on job complexity.
- Retries: Configure max retries based on job criticality.
- Priority: Use priorities wisely - reserve 'urgent' for truly time-critical tasks.
🔍 Error Handling
The package handles various types of errors:
- Connection failures
- Execution timeouts
- Runtime errors
- Worker process failures
Failed jobs are automatically logged with full stack traces in the failed_jobs
table.
📛 Limitations
- Windows support is limited for signal handling
- Maximum execution time is subject to PHP's
max_execution_time
setting - Single-server deployment only (no distributed queue support)
📌 To-do Improvements
- Implement job events/hooks
- Add support for job batching
- Add Redis/memory queue support
- Add job progress tracking
- Implement job middleware support
- Add support for unique jobs
- Add job chaining capabilities
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
📄 License
This project is licensed under the MIT License.