Download the PHP package g-giani/notifier without Composer
On this page you can find all versions of the php package g-giani/notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download g-giani/notifier
More information about g-giani/notifier
Files in g-giani/notifier
Package notifier
Short Description 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.
License MIT
Informations about the package 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
Requires PHP 8.2+.
Quick start
Channels
| Channel | Dependency | Notes |
|---|---|---|
EmailChannel |
symfony/mailer |
Accepts any Symfony DSN (SMTP, SES, Mailgun, …) |
SignalChannel |
HTTP | Targets signal-cli-rest-api |
NtfyChannel |
HTTP | Targets an ntfy server (self-hosted or ntfy.sh) |
SlackChannel |
HTTP | Slack Incoming Webhook |
DiscordChannel |
HTTP | Discord Webhook (rich embeds) |
MattermostChannel |
HTTP | Mattermost Incoming Webhook |
TelegramChannel |
HTTP | Telegram Bot API (sendMessage) |
GotifyChannel |
HTTP | Self-hosted Gotify |
GenericWebhookChannel |
HTTP | POST JSON payload to any URL |
NullChannel |
— | For tests / dry-run |
Implement 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
Notifier::notify() never throws — it returns the list of ChannelExceptions
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
MIT
All versions of notifier with dependencies
symfony/mailer Version ^6.4 || ^7.0
guzzlehttp/guzzle Version ^7.8
psr/log Version ^3.0