Download the PHP package fahriar/laravel-shared-queue without Composer

On this page you can find all versions of the php package fahriar/laravel-shared-queue. 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 laravel-shared-queue

Laravel Shared Queue

A robust, shared-hosting-friendly asynchronous task runner for Laravel.

This package provides a database-backed, cron-driven, retryable, idempotent async task system. It is specifically architected for environments where traditional queue workers (like Supervisor + php artisan queue:work or Redis/Horizon) cannot run continuously. Perfect for cPanel, DirectAdmin, or strictly restricted shared hosting setups.


๐Ÿš€ When to use this package

โš ๏ธ When NOT to use this package


๐Ÿ“ฆ Installation

Require the package via composer:

Publish the configuration file and database migrations:

Run the database migrations to create the shared_queue_tasks table:


๐Ÿ› ๏ธ Setup & Configuration

Define your tasks inside config/shared-queue.php. Here you map simple string types to concrete classes:

Create a Task Handler

Your handlers must implement the LaravelSharedQueue\Contracts\TaskHandler contract. It natively supports Laravel's Container, so dependency injection in the constructor works perfectly:

Keep your task handlers idempotent and bite-sized. Let the database act as the state engine!


โšก Dispatching Tasks

You can dispatch tasks seamlessly using the injected Facade or the global helper function.

Basic Dispatch

Delayed Tasks

Need to process something in the future? Pass an explicit delay:

Idempotency (Prevent Duplicate Jobs)

If you operate in high-traffic or looping scripts, protect against identical tasks firing simultaneously:

If a pending or processing task already exists with this key, the dispatch safely ignores the request to avoid duplicates.

Dispatch After Database Commit

Only dispatch the task if the outer database transaction officially commits:

This safely waits until the active DB transaction commits before finally inserting the task queue row.


โš™๏ธ Running the Worker

Since this is built explicitly for shared hosting systems, you run the queue worker natively via Laravel's scheduled cron job engine.

In your routes/console.php (Laravel 11+) or app/Console/Kernel.php (Laravel 10):

Make sure your server/cPanel cron is set to trigger your application schedule every minute natively:

Once running, the worker runs batch checks and operates securely utilizing robust database row-locking tools (skipLocked() / lockForUpdate()) to ensure no race conditions overlap.


๐Ÿงฐ Managing Tasks (CLI)

The package provides a suite of helpful Artisan commands to inspect your queue:


๐Ÿงช Testing (For Contributors)

To run the internal unit and feature test suite ensuring 100% stable compatibility:

๐Ÿ”’ Security Vulnerabilities

If you discover a security vulnerability within this package, please e-mail Fahriar Ahammed via [email protected]. All security vulnerabilities will be promptly addressed.

๐Ÿ“ License

The Laravel Shared Queue package is open-sourced software licensed under the MIT license.


All versions of laravel-shared-queue with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/console Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^10.0 || ^11.0 || ^12.0 || ^13.0
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 fahriar/laravel-shared-queue contains the following files

Loading the files please wait ...