Download the PHP package bugfix666/laravel-outbox without Composer

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

Laravel Outbox

Latest Version on Packagist PHP Version Laravel Version License [PHP]() Run Tests Total Downloads

Transactional Outbox pattern implementation for Laravel 12+ (PHP 8.4+).
Guarantees atomicity and reliable event delivery in distributed systems, especially fintech, e‑commerce, and microservices.


📊 Comparison with Existing Solutions

There are several open‑source implementations of the Transactional Outbox pattern for Laravel. Here’s how laravel-outbox compares to them:

Feature This Package webrek/laravel-outbox GaiPalyan/laravel-outbox Dnakitare/laravel-outbox
PHP Version 8.4+ 8.1+ 8.1+ 8.2+
Laravel Version 12+ 10+ 10+ 10 – 12
PHP 8.4 Features (typed properties, readonly, attributes) ✅ Full ❌ ❌ ❌
Production‑ready ✅ Yes ✅ Yes ✅ Yes ⚠️ Beta (0.1.0-beta1)
Strict Typing ✅ Yes — — —
Unit & Feature Tests ✅ 15 tests ❌ ❌ ✅ (limited)
Dead Letter Queue (DLQ) ✅ Yes ❌ ❌ ✅ Yes
Inbox Pattern ❌ (outbox only) ❌ ✅ ❌
Event / Job Interception ❌ (explicit control) ❌ ❌ ✅ (auto‑intercepts)
Atomicity ✅ (single DB transaction) ✅ ✅ ✅
Custom Publishers ✅ (via contract) ✅ ✅ —
Retry Logic ✅ (exponential backoff) ✅ ✅ ✅
Worker Locking ✅ (prevents parallel runs) ✅ ❌ —
Cleanup Command ✅ (outbox:cleanup) ✅ ✅ ✅
Monitoring Events ✅ (Processed / Failed) ✅ ❌ —

🚀 Why This Package Stands Out

  1. Cutting‑Edge Stack – Built specifically for PHP 8.4+ and Laravel 12+, leveraging the latest language features for cleaner, safer, and more maintainable code.

  2. Production‑Ready – Unlike some alternatives that are still in beta, this package is fully tested (15+ unit and feature tests) and ready for mission‑critical applications.

  3. Dead Letter Queue (DLQ) – Failed messages after all retries are not lost. They remain in the outbox table for inspection and manual intervention – essential for fintech and reliability‑first systems.

  4. Explicit Control, No Magic – Unlike packages that automatically intercept all events/jobs, this package gives you full control over what and when to publish. No surprises, easier debugging, and predictable behavior.

  5. Built‑in Monitoring – The OutboxMessageProcessed and OutboxMessageFailed events allow seamless integration with logging, metrics (Prometheus, StatsD), and alerting.

  6. Strict Typing & Modern Practices – Readonly classes, typed properties, constructor property promotion, and console command attributes make the code self‑documenting and robust.

If you need a reliable, modern, and transparent outbox implementation for your fintech or distributed system – this package is the best choice among all existing open‑source solutions.


📦 Features


🔧 Requirements


📥 Installation


🚀 Setup

Publish the configuration and migration files:

Run the migration to create the outbox_messages table:


⚙️ Configuration

The config file config/outbox.php allows you to tailor the package to your needs:

Set your preferred publisher in .env:


💡 Basic Usage

1. Store an outbox message inside a transaction

2. Run the worker

Start the outbox processor (should be supervised in production):

You can override batch size on the fly:

3. Clean up old processed messages

Schedule the cleanup command to run daily (in routes/console.php):

Or run manually:


🔌 Custom Publisher

By default, the package logs events. To send events to a real broker, create a class that implements Bugfix666\LaravelOutbox\Contracts\OutboxPublisher:

Then set OUTBOX_PUBLISHER=App\Publishers\KafkaPublisher in your .env.

Tip: For RabbitMQ, use php-amqplib; for AWS SNS, use the Laravel SNS facade.


🧩 Monitoring and Events

The package fires two events that you can listen to:

Example listener:

Register your listener in EventServiceProvider.


🔄 Retry Logic

When publishing fails, the worker increments the attempts counter and sets available_at to now() + delay_seconds. The next run will only pick messages where available_at is in the past, giving the broker time to recover.

After max_attempts failures, the message remains unprocessed but is considered failed – you can handle it manually or set up an alert.


🧪 Testing

The package is fully testable. You can mock the publisher and assert that messages are stored and processed correctly.

Example test:


📊 Performance Considerations


🛠 Supervisor Configuration

For production, keep the worker running with Supervisor:


📖 Full Documentation


🤝 Contributing

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes (git commit -m 'Add some amazing feature').
  4. Push to the branch (git push origin feature/amazing-feature).
  5. Open a Pull Request.

Please ensure that your code passes the existing tests and is well‑documented.


📝 License

This package is open‑source software licensed under the MIT license.


💬 Support

For questions, bug reports, or feature requests, please open an issue on GitHub.


Happy coding, and may your events always be delivered! 🚀


All versions of laravel-outbox with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
laravel/framework Version ^12.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 bugfix666/laravel-outbox contains the following files

Loading the files please wait ...