PHPackages                             xmon-org/notification-bundle - 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. xmon-org/notification-bundle

ActiveSymfony-bundle[Mail &amp; Notifications](/categories/mail)

xmon-org/notification-bundle
============================

Symfony bundle for multi-channel notifications (Email, Telegram, In-App)

1.5.0(6mo ago)00MITPHPPHP &gt;=8.2CI passing

Since Dec 23Pushed 6mo agoCompare

[ Source](https://github.com/xmon-org/notification-bundle)[ Packagist](https://packagist.org/packages/xmon-org/notification-bundle)[ RSS](/packages/xmon-org-notification-bundle/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (11)Versions (8)Used By (0)

Xmon Notification Bundle
========================

[](#xmon-notification-bundle)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fad55566a907619d4c1f7c3a29109c28768afbb712189768986033a2d4edc2f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f786d6f6e2d6f72672f6e6f74696669636174696f6e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xmon-org/notification-bundle)[![PHP Version](https://camo.githubusercontent.com/f83231f52ff516dfc5a2e8a012dd1d6a48d3e87b3a7a21a9efadaa31f586a957/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f786d6f6e2d6f72672f6e6f74696669636174696f6e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xmon-org/notification-bundle)[![Symfony](https://camo.githubusercontent.com/db84d533331cb9d6b54e99ff425d6b08cda8c483a61f88c19bfe7f754b46c085/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d372e782d707572706c652e7376673f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79)](https://symfony.com)[![Total Downloads](https://camo.githubusercontent.com/14442924a875f6d6847315b50bf6c861feee2e23197ea099db5b1115135fa03e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f786d6f6e2d6f72672f6e6f74696669636174696f6e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xmon-org/notification-bundle)[![License](https://camo.githubusercontent.com/6a5ed10e7ea67b82a5c6cdfe3c1b935fde7498f83b2dfcc2c419a741e3307eb5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f786d6f6e2d6f72672f6e6f74696669636174696f6e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/xmon-org/notification-bundle/blob/main/LICENSE)

[![CI](https://github.com/xmon-org/notification-bundle/actions/workflows/ci.yml/badge.svg)](https://github.com/xmon-org/notification-bundle/actions/workflows/ci.yml)[![semantic-release](https://camo.githubusercontent.com/e54d898d208c4f040bc3c1d54543286bf79d714d85262afd247e8c0ca1cbc798/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73656d616e7469632d2d72656c656173652d636f6e76656e74696f6e616c636f6d6d6974732d6531303037393f6c6f676f3d73656d616e7469632d72656c65617365)](https://github.com/semantic-release/semantic-release)

Symfony 7 bundle for multi-channel notifications (Email, Telegram, In-App).

Features
--------

[](#features)

- **Multi-channel support**: Email, Telegram (Discord, Slack planned)
- **Telegram Bot API**: Messages, photos, stickers, inline keyboards, webhooks
- **Guided conversations**: ForceReply support for multi-step chat interactions
- **Flexible configuration**: YAML-based channel configuration
- **Event-driven**: Pre-send, sent, and failed events for extensibility
- **Template rendering**: Twig templates for customizable notifications
- **Async support**: Optional Messenger integration for background processing
- **Type-safe**: PHP 8.2+ with strict types and enums
- **Symfony 7 best practices**: DI, tagged services, compiler passes

Documentation
-------------

[](#documentation)

- [Email Channel](docs/email.md) - Configuration, templates, events
- [Telegram Channel](docs/telegram.md) - Bot API, webhooks, inline keyboards

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

[](#installation)

```
composer require xmon-org/notification-bundle
```

Configuration
-------------

[](#configuration)

```
# config/packages/xmon_notification.yaml
xmon_notification:
    channels:
        email:
            enabled: true
            from: 'noreply@example.com'
            from_name: 'My App'

        telegram:
            enabled: true
            bot_token: '%env(TELEGRAM_BOT_TOKEN)%'
            chat_ids:
                - '%env(TELEGRAM_CHAT_ID)%'
            webhook_secret: '%env(default::TELEGRAM_WEBHOOK_SECRET)%'

        in_app:
            enabled: true
            storage: 'session'  # session | doctrine
            max_notifications: 50

    messenger:
        enabled: false
        transport: 'async'

    defaults:
        channels: ['email']
        priority: 'normal'
```

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
use Xmon\NotificationBundle\Notification\SimpleNotification;
use Xmon\NotificationBundle\Recipient\Recipient;
use Xmon\NotificationBundle\Service\NotificationService;

class MyService
{
    public function __construct(
        private NotificationService $notificationService,
    ) {}

    public function sendWelcomeEmail(User $user): void
    {
        $notification = new SimpleNotification(
            title: 'Welcome!',
            content: 'Thanks for joining our platform.',
            channels: ['email', 'telegram'],
        );

        $recipient = new Recipient(
            email: $user->getEmail(),
            telegramChatId: $user->getTelegramChatId(),
        );

        $results = $this->notificationService->send($notification, $recipient);

        foreach ($results as $result) {
            if ($result->isSuccess()) {
                // Handle success
            }
        }
    }
}
```

### With Custom Template

[](#with-custom-template)

```
$notification = new SimpleNotification(
    title: 'Order Confirmed',
    content: 'Your order #123 has been confirmed.',
    template: 'emails/order_confirmation',
    context: ['order' => $order],
    channels: ['email'],
);
```

### Priority Levels

[](#priority-levels)

```
use Xmon\NotificationBundle\Notification\NotificationPriority;

$notification = new SimpleNotification(
    title: 'Critical Alert',
    content: 'System error detected!',
    priority: NotificationPriority::Urgent,
);
```

Events
------

[](#events)

Subscribe to notification events for custom logic:

```
use Xmon\NotificationBundle\Event\NotificationPreSendEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class NotificationSubscriber implements EventSubscriberInterface
{
    public static function getSubscribedEvents(): array
    {
        return [
            NotificationPreSendEvent::class => 'onPreSend',
        ];
    }

    public function onPreSend(NotificationPreSendEvent $event): void
    {
        // Modify notification or cancel sending
        if ($this->shouldCancel($event->notification)) {
            $event->cancel();
        }
    }
}
```

Requirements
------------

[](#requirements)

- PHP 8.2+
- Symfony 7.0+
- Symfony Mailer (for email channel)
- Symfony HttpClient (for Telegram/webhook channels)

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) file for details.

Development Status
------------------

[](#development-status)

**Phase 1**: Core + Email Channel ✅

- Channel architecture
- Email channel with Symfony Mailer
- Event system
- Template rendering

**Phase 2**: Telegram Channel ✅

- TelegramService with full Bot API support
- Inline keyboards with callback handling
- Webhook controller for updates
- Photo, message, sticker support

**Phase 3 (Planned)**: In-App Notifications (Sonata Admin) **Phase 4 (Planned)**: Messenger Async Support

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

[](#contributing)

Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for:

- Development setup
- Code standards (PHP-CS-Fixer, PHPStan)
- Git hooks and commit conventions
- Pull request process

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance68

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.6% 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 ~1 days

Total

6

Last Release

188d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8b2aa64f88de1a5b6784b0467b50d1be49a2989771faecd340c114445b67f0f?d=identicon)[xmon\_df](/maintainers/xmon_df)

---

Top Contributors

[![new-xmon-df](https://avatars.githubusercontent.com/u/144630403?v=4)](https://github.com/new-xmon-df "new-xmon-df (22 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (6 commits)")

---

Tags

symfonybundleemailnotificationstelegramsonata-adminin app

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/xmon-org-notification-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/xmon-org-notification-bundle/health.svg)](https://phpackages.com/packages/xmon-org-notification-bundle)
```

###  Alternatives

[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

515100.5k3](/packages/web-auth-webauthn-framework)[symfony/mailer

Helps sending emails

1.6k409.1M1.4k](/packages/symfony-mailer)

PHPackages © 2026

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