PHPackages                             snip404/symfony-max-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. snip404/symfony-max-notifier

ActiveSymfony-notifier-bridge[Utility &amp; Helpers](/categories/utility)

snip404/symfony-max-notifier
============================

Symfony Max Notifier Bridge

1.0.6(3mo ago)016↓90%MITPHPPHP &gt;=8.2

Since Mar 26Pushed 3mo agoCompare

[ Source](https://github.com/snip404/symfony-max-notifier)[ Packagist](https://packagist.org/packages/snip404/symfony-max-notifier)[ Docs](https://github.com/snip404/symfony-max-notifier)[ RSS](/packages/snip404-symfony-max-notifier/feed)WikiDiscussions master Synced 3w ago

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

Max Notifier
============

[](#max-notifier)

Provides [MAX](https://max.ru) integration for Symfony Notifier.

Register as a symfony service

```
services:
  ...
  Symfony\Component\Notifier\Bridge\Max\MaxTransportFactory:
    tags: [ texter.transport_factory ]
```

DSN example
-----------

[](#dsn-example)

```
MAX_DSN=max://TOKEN@default

```

where:

- `TOKEN` is your MAX token

Adding Interactions to a Message
--------------------------------

[](#adding-interactions-to-a-message)

With a Max message, you can use the `MaxOptions` class to add [message options](https://dev.max.ru/docs-api).

```
use Symfony\Component\Notifier\Bridge\Max\Markup\Button\KeyboardButton;
use Symfony\Component\Notifier\Bridge\Max\Markup\InlineKeyboardMarkup;
use Symfony\Component\Notifier\Bridge\Max\MaxOptions;
use Symfony\Component\Notifier\Message\ChatMessage;

$chatMessage = new ChatMessage('');

// Create MAX options
$maxOptions = (new MaxOptions())
    ->chatId('222222')
    ->parseMode('markdown')
    ->keyboard((new InlineKeyboardMarkup())
        ->addButton((new KeyboardButton("Visit symfony.com"))->link("https://symfony.com"))
        )
    );

// Add the custom options to the chat message and send the message
$chatMessage->options($maxOptions);

$chatter->send($chatMessage);
```

Adding files to a Message
-------------------------

[](#adding-files-to-a-message)

With a Max message, you can use the `MaxOptions` class to add [message options](https://dev.max.ru/docs-api).

> ⚠️ **WARNING**In one message you can send only one file

- You can send files by passing public http url to option:

    - Photo ```
        $maxOptions = (new MaxOptions())
             ->image('https://localhost/photo.mp4');
        ```
- You can send files by passing local path to option, in this case file will be sent via multipart/form-data:

    - Image ```
        $maxOptions = (new MaxOptions())
             ->uploadImage('./photo.mp4');
        ```

        - Images

        ```
        $maxOptions = (new MaxOptions())
             ->uploadImages(['./photo.mp4']);
        ```
    - Video ```
        $maxOptions = (new MaxOptions())
             ->uploadVideo('./video.mp4');
        ```

        ```

        ```
    - Audio ```
        $maxOptions = (new MaxOptions())
             ->uploadAudio('./audio.ogg');
        ```
    - File ```
        $maxOptions = (new MaxOptions())
             ->document('./document.odt');
        ```

Full example:

```
use Symfony\Component\Notifier\Bridge\Max\MaxOptions;
use Symfony\Component\Notifier\Message\ChatMessage;

$chatMessage = new ChatMessage('Photo Caption');

// Create MAX options
$maxOptions = (new MaxOptions())
    ->chatId('1111111')
    ->parseMode('html')
    ->image('https://symfony.com/favicons/android-chrome-192x192.png');

// Add the custom options to the chat message and send the message
$chatMessage->options($maxOptions);

$chatter->send($chatMessage);
```

Adding Location to a Message
----------------------------

[](#adding-location-to-a-message)

With a MAX message, you can use the `MaxOptions` class to add [message options](https://dev.max.ru/docs-api).

```
use Symfony\Component\Notifier\Bridge\Max\MaxOptions;
use Symfony\Component\Notifier\Message\ChatMessage;

$chatMessage = new ChatMessage('');

// Create Max options
$maxOptions = (new MaxOptions())
    ->chatId('111111')
    ->parseMode('html')
    ->location(48.8566, 2.3522);

// Add the custom options to the chat message and send the message
$chatMessage->options($maxOptions);

$chatter->send($chatMessage);
```

Adding Contact to a Message
---------------------------

[](#adding-contact-to-a-message)

With a Max message, you can use the `MaxOptions` class to add [message options](https://dev.max.ru/docs-api).

```
use Symfony\Component\Notifier\Bridge\Max\MaxOptions;
use Symfony\Component\Notifier\Message\ChatMessage;

$chatMessage = new ChatMessage('');
// Create MAX options
$maxOptions = (new MaxOptions())
    ->chatId('111111')
    ->parseMode('html');

// Via vCard
$vCard = 'BEGIN:VCARD
VERSION:3.0
N:Doe;John;;;
FN:John Doe
EMAIL;type=INTERNET;type=WORK;type=pref:johnDoe@example.org
TEL;type=WORK;type=pref:+330186657200
END:VCARD';
$maxOptions->contact(null, vcfInfo: $vCard);

// Via contactId (userId from MAX)
$maxOptions->contact(null, contactId: 222222);

// Add the custom options to the chat message and send the message
$chatMessage->options($maxOptions);

$chatter->send($chatMessage);
```

Updating Messages
-----------------

[](#updating-messages)

When working with interactive callback buttons, you can use the `MaxOptions`to reference a previous message to edit.

```
use Symfony\Component\Notifier\Bridge\Max\Reply\Markup\Button\InlineKeyboardButton;
use Symfony\Component\Notifier\Bridge\Max\Reply\Markup\InlineKeyboardMarkup;
use Symfony\Component\Notifier\Bridge\Max\MaxOptions;
use Symfony\Component\Notifier\Message\ChatMessage;

$chatMessage = new ChatMessage('Are you really sure?');

$maxOptions = (new MaxOptions())
    ->chatId($chatId)
    ->edit($messageId) // extracted from callback payload or SentMessage
    ->keyboard((new InlineKeyboardMarkup())
        ->addButton((new KeyboardButton("Absolutely"))->callback("yes"))
        ->addRow()
        ->addButton((new KeyboardButton("open symfony"))->link("https://symfony.com"))
    );
```

Deleting Messages
-----------------

[](#deleting-messages)

When working with interactive callback buttons, you can use the `MaxOptions`to reference a previous message to delete.

```
use Symfony\Component\Notifier\Bridge\Max\Reply\Markup\Button\InlineKeyboardButton;
use Symfony\Component\Notifier\Bridge\Max\Reply\Markup\InlineKeyboardMarkup;
use Symfony\Component\Notifier\Bridge\Max\MaxOptions;
use Symfony\Component\Notifier\Message\ChatMessage;

$chatMessage = new ChatMessage('Are you really sure?');

$maxOptions = (new MaxOptions())
    ->chatId($chatId)
    ->delete($messageId); // extracted from callback payload or SentMessage
```

Answering Callback Queries
--------------------------

[](#answering-callback-queries)

The `MaxOptions::answerCallbackQuery()` method was introduced in Symfony 6.3.

When sending message with inline keyboard buttons with callback data, you can use `MaxOptions` to [answer callback queries](https://dev.max.ru/docs-api/methods/POST/answers).

```
use Symfony\Component\Notifier\Bridge\Max\MaxOptions;
use Symfony\Component\Notifier\Message\ChatMessage;

$chatMessage = new ChatMessage('Thank you!');
$maxOptions = (new MaxOptions())
    ->chatId($chatId)
    ->answerCallbackQuery(
        callbackQueryId: '12345', // extracted from callback
        notification: true
    );
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance82

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

7

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/26725b0bdd93b53ab9687fa291b141a6a975865da42ff996d0a94de36778555c?d=identicon)[snip404](/maintainers/snip404)

---

Tags

notifiermax

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/snip404-symfony-max-notifier/health.svg)

```
[![Health](https://phpackages.com/badges/snip404-symfony-max-notifier/health.svg)](https://phpackages.com/packages/snip404-symfony-max-notifier)
```

###  Alternatives

[symfony/telegram-notifier

Symfony Telegram Notifier Bridge

73953.8k6](/packages/symfony-telegram-notifier)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)[symfony/firebase-notifier

Symfony Firebase Notifier Bridge

12900.6k1](/packages/symfony-firebase-notifier)[symfony/rocket-chat-notifier

Symfony RocketChat Notifier Bridge

13118.9k](/packages/symfony-rocket-chat-notifier)

PHPackages © 2026

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