Download the PHP package wal3fo/laravel-sentinel without Composer

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

Wal3fo Laravel Sentinel

Packagist Version Total Downloads PHP Laravel

Production-ready circuit breaker for Laravel queues and service calls, built to stop cascading failures with closed, open, and half-open states.

Introduction

When a dependency starts failing (mail API, payment gateway, CRM, webhook target), retries alone can overload workers and amplify outages. A circuit breaker prevents that by temporarily short-circuiting failing paths, then probing recovery in a controlled way.

Wal3fo Laravel Sentinel is designed for Laravel queue-heavy applications where resilience and predictable failure handling matter. Use it when:

Features

Installation

Publish the package configuration:

[!TIP] Use Redis as the cache backend for distributed queue workers and reliable lock behavior.

Configuration

Sentinel is configured in config/sentinel.php.

Global defaults are defined under defaults, then selectively overridden per service under services.

Key Options

Per-Service Overrides

Any service key in services inherits from defaults and can override only what it needs.

Basic Usage

Queue Job Middleware

Multiple services in one job:

Attribute Usage

When you prefer declarative service mapping, use the package attribute and instantiate middleware without arguments.

How It Works

Sentinel tracks attempts and failures per service in cache.

  1. closed: requests/jobs flow normally while failures are recorded.
  2. open: once min_requests is met and failure_rate >= threshold, executions are short-circuited.
  3. half_open: after cooldown_seconds, Sentinel allows limited probes (half_open_probe_limit).
  4. On probe success, the circuit closes and counters reset.
  5. On probe failure, the circuit re-opens and cooldown restarts.

Failure rate is calculated as:

$$ ext{failure_rate} = \frac{\text{failures}}{\text{attempts}} \times 100 $$

When a queue middleware check finds a circuit open (or half-open without an available probe slot), the job is released using the configured release_delay_seconds.

Failure Classification

By default, Sentinel uses:

The default classifier ignores configured business exceptions and counts outage-like exceptions.

To customize behavior, provide your own classifier implementing:

Register it in configuration:

Artisan Commands

Events

Sentinel dispatches events on state changes:

Each event extends Wal3fo\LaravelSentinel\Events\CircuitStateChanged and includes service, state, and status data.

Best Practices

Testing

Run the test suite:

The package includes coverage for:

Compatibility

Contributing

Contributions are welcome.

  1. Fork the repository.
  2. Create a feature branch.
  3. Add tests for behavioral changes.
  4. Run composer test.
  5. Open a pull request with a clear description.

License

Released under the MIT License.


All versions of laravel-sentinel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/cache Version ^10.0|^11.0|^12.0|^13.0
illuminate/config 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
illuminate/events Version ^10.0|^11.0|^12.0|^13.0
illuminate/support 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 wal3fo/laravel-sentinel contains the following files

Loading the files please wait ...