PHPackages                             rojtjo/laravel-auto-subscriber - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rojtjo/laravel-auto-subscriber

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rojtjo/laravel-auto-subscriber
==============================

laravel-auto-subscriber

0.4.0(3mo ago)05.5kMITPHPPHP ^8.3CI passing

Since Mar 10Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/rojtjo/laravel-auto-subscriber)[ Packagist](https://packagist.org/packages/rojtjo/laravel-auto-subscriber)[ Docs](https://github.com/rojtjo/laravel-auto-subscriber)[ RSS](/packages/rojtjo-laravel-auto-subscriber/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (4)Versions (14)Used By (0)

laravel-auto-subscriber
=======================

[](#laravel-auto-subscriber)

[![Latest Version on Packagist](https://camo.githubusercontent.com/07c4fcdff90bcd7645123d147f54e6f4b1b5a9cdd3e5a03e1d0f18de43ca7ced/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6a746a6f2f6c61726176656c2d6175746f2d737562736372696265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rojtjo/laravel-auto-subscriber)[![GitHub Tests Action Status](https://camo.githubusercontent.com/39ec3dd993489c124a3742009ff2b1d9ddf64d61292ac713c3f0b3fd0f680fb9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726f6a746a6f2f6c61726176656c2d6175746f2d737562736372696265722f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572)](https://github.com/rojtjo/laravel-auto-subscriber/actions?query=workflow%3ATests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/970198eacb907bf25a9270ba35ec92e45e477ef7256aba5e633c97f573c3e9a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6a746a6f2f6c61726176656c2d6175746f2d737562736372696265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rojtjo/laravel-auto-subscriber)

Automatically subscribe to all events for which your subscriber contains a handler. Under the hood we use reflection to detect all listeners defined on the subscriber.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require rojtjo/laravel-auto-subscriber
```

Usage
-----

[](#usage)

All you have to do is use the `Rojtjo\LaravelAutoSubscriber\AutoSubscriber` trait on your subscriber class. Also make sure to register your subscriber in the `EventServiceProvider` like you're used to.

Example
-------

[](#example)

```
use Rojtjo\LaravelAutoSubscriber\AutoSubscriber;

final class UserNotifier
{
    use AutoSubscriber;

    public function welcomeUser(UserCreated $event): void
    {
        // Send welcome notification..
    }
}
```

This would equivalent to a handwritten subscriber like shown below.

```
use Illuminate\Contracts\Events\Dispatcher;

final class UserNotifier
{
    public function subscribe(Dispatcher $events)
    {
        $events->listen(UserCreated::class, [$this, 'welcomeUser']);
    }

    // ...
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Roj Vroemen](https://github.com/rojtjo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance81

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~305 days

Recently: every ~281 days

Total

7

Last Release

101d ago

PHP version history (3 changes)0.1.0PHP ^7.4|^8.0

0.3.0PHP ^8.0

0.4.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5dc56de17326e155210bbdbc689759955974cb97f9a91642169748e3b837584?d=identicon)[Rojtjo](/maintainers/Rojtjo)

---

Top Contributors

[![rojtjo](https://avatars.githubusercontent.com/u/1123887?v=4)](https://github.com/rojtjo "rojtjo (50 commits)")

---

Tags

laraveleventsautosubscriberrojtjo

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rojtjo-laravel-auto-subscriber/health.svg)

```
[![Health](https://phpackages.com/badges/rojtjo-laravel-auto-subscriber/health.svg)](https://phpackages.com/packages/rojtjo-laravel-auto-subscriber)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.1M11.1k](/packages/illuminate-database)[illuminate/support

The Illuminate Support package.

582110.9M39.9k](/packages/illuminate-support)[illuminate/events

The Illuminate Events package.

13556.1M2.0k](/packages/illuminate-events)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[illuminate/config

The Illuminate Config package.

10943.9M2.4k](/packages/illuminate-config)[illuminate/session

The Illuminate Session package.

9938.5M822](/packages/illuminate-session)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
