PHPackages                             g-giani/notifier - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. g-giani/notifier

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

g-giani/notifier
================

Channel-agnostic notification dispatcher for PHP. Ships with Email, Signal, ntfy, Slack, Discord, Mattermost, Telegram, Gotify and generic-webhook channels; extensible via a simple ChannelInterface.

v0.2.0(1mo ago)11MITPHPPHP ^8.2

Since Apr 14Pushed 1mo agoCompare

[ Source](https://github.com/g-giani/notifier)[ Packagist](https://packagist.org/packages/g-giani/notifier)[ RSS](/packages/g-giani-notifier/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

notifier
========

[](#notifier)

A channel-agnostic notification dispatcher for PHP. Build a `Message`, hand it to a `Notifier`, and it fans out to every configured channel (email, Signal, and any other you implement). A failing channel is isolated — subsequent channels still run.

Install
-------

[](#install)

```
composer require g-giani/notifier
```

Requires PHP 8.2+.

Quick start
-----------

[](#quick-start)

```
use GGiani\Notifier\{Notifier, Message, Severity};
use GGiani\Notifier\Channel\{EmailChannel, SignalChannel};
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mailer\Transport;
use GuzzleHttp\Client;

$email = new EmailChannel(
    mailer: new Mailer(Transport::fromDsn('smtp://user:pass@smtp.example.com:587')),
    from: 'alerts@example.com',
    to: ['ops@example.com'],
    subjectPrefix: '[Monitor]',
);

$signal = new SignalChannel(
    http: new Client(['base_uri' => 'http://localhost:8080/']),
    sender: '+4915112345678',
    recipients: ['+4915187654321'],
);

$notifier = new Notifier($email, $signal);

$failures = $notifier->notify(new Message(
    title: 'Provider sync failed',
    body: 'Provider.com returned no records for 3 consecutive runs.',
    severity: Severity::Critical,
    context: ['provider_id' => 117, 'process_id' => '5dhxl36s'],
));

// $failures is a list — empty when everything went through.
```

Channels
--------

[](#channels)

ChannelDependencyNotes`EmailChannel``symfony/mailer`Accepts any Symfony DSN (SMTP, SES, Mailgun, …)`SignalChannel`HTTPTargets [signal-cli-rest-api](https://github.com/bbernhard/signal-cli-rest-api)`NtfyChannel`HTTPTargets an [ntfy](https://ntfy.sh) server (self-hosted or ntfy.sh)`SlackChannel`HTTPSlack Incoming Webhook`DiscordChannel`HTTPDiscord Webhook (rich embeds)`MattermostChannel`HTTPMattermost Incoming Webhook`TelegramChannel`HTTPTelegram Bot API (`sendMessage`)`GotifyChannel`HTTPSelf-hosted [Gotify](https://gotify.net)`GenericWebhookChannel`HTTPPOST JSON payload to any URL`NullChannel`—For tests / dry-runImplement `GGiani\Notifier\Channel\ChannelInterface` to add your own (Telegram, Slack, WhatsApp, webhook, …). Throw `ChannelException` on failure to let the Notifier continue with the remaining channels.

Error handling
--------------

[](#error-handling)

`Notifier::notify()` never throws — it returns the list of `ChannelException`s from channels that failed, so the caller can decide what to do (log, retry, escalate). If you want a logger wired in, call `->withLogger($psrLogger)` — failures are then also logged at `error` level.

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance89

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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 ~22 days

Total

3

Last Release

57d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17945120?v=4)[G. Giani](/maintainers/g-giani)[@g-giani](https://github.com/g-giani)

---

Tags

broadcastingdiscordemailgotifymattermostnotificationsntfysignalslacktelegramemailsignalnotificationnotifierslackwebhooktelegramdiscordMattermostNtfyalertinggotify

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/g-giani-notifier/health.svg)

```
[![Health](https://phpackages.com/badges/g-giani-notifier/health.svg)](https://phpackages.com/packages/g-giani-notifier)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.5k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NotifyX、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

687114.3k8](/packages/guanguans-notify)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19566.0M1.8k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M425](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M600](/packages/shopware-core)

PHPackages © 2026

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