PHPackages                             guanguans/notify - 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. guanguans/notify

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

guanguans/notify
================

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

4.1.1(2mo ago)682104.9k—5.7%446MITPHPPHP &gt;=8.1CI passing

Since May 15Pushed 1mo ago8 watchersCompare

[ Source](https://github.com/guanguans/notify)[ Packagist](https://packagist.org/packages/guanguans/notify)[ Docs](https://github.com/guanguans/notify)[ Fund](https://guanguans.github.io/sponsors)[ RSS](/packages/guanguans-notify/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (118)Versions (147)Used By (6)

notify
======

[](#notify)

Note

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

[![tests](https://github.com/guanguans/notify/actions/workflows/tests.yml/badge.svg)](https://github.com/guanguans/notify/actions/workflows/tests.yml)[![php-cs-fixer](https://github.com/guanguans/notify/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/guanguans/notify/actions/workflows/php-cs-fixer.yml)[![codecov](https://camo.githubusercontent.com/6df2af060d01e60500c8446986d88fe76df5c5662851d1e38806d2f8739ab765/68747470733a2f2f636f6465636f762e696f2f67682f6775616e6775616e732f6e6f746966792f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d55524746415753365334)](https://codecov.io/gh/guanguans/notify)[![Latest Stable Version](https://camo.githubusercontent.com/4d50a3ab750d53d44b191514c70be363b8276a1e0a22add5b1e59d6234962c92/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6e6f746966792f76)](https://packagist.org/packages/guanguans/notify)[![GitHub release (with filter)](https://camo.githubusercontent.com/db6de78b3127d3aab230b2d1db6c28c6cd49eda85a2fe76c21bed34136326803/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6775616e6775616e732f6e6f74696679)](https://github.com/guanguans/notify/releases)[![Total Downloads](https://camo.githubusercontent.com/7f0f465a08491c00cac60b00251d8bd481044dda6fefc0e66d3d0a4287141771/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6e6f746966792f646f776e6c6f616473)](https://packagist.org/packages/guanguans/notify)[![License](https://camo.githubusercontent.com/091b1a5245a17579010e01dc5a6cf72d3b8457c6f1d732f7e216d82951acf94f/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6e6f746966792f6c6963656e7365)](https://packagist.org/packages/guanguans/notify)

Platform support
----------------

[](#platform-support)

- [AnPush](src/AnPush/README.md)
- [Bark](src/Bark/README.md)
- [Chanify](src/Chanify/README.md)
- [DingTalk](src/DingTalk/README.md)
- [Discord](src/Discord/README.md)
- [Gitter](src/Gitter/README.md)
- [GoogleChat](src/GoogleChat/README.md)
- [IGot](src/IGot/README.md)
- [Lark](src/Lark/README.md)
- [Mattermost](src/Mattermost/README.md)
- [MicrosoftTeams](src/MicrosoftTeams/README.md)
- [NowPush](src/NowPush/README.md)
- [Ntfy](src/Ntfy/README.md)
- [Push](src/Push/README.md)
- [Pushback](src/Pushback/README.md)
- [PushBullet](src/PushBullet/README.md)
- [PushDeer](src/PushDeer/README.md)
- [PushMe](src/PushMe/README.md)
- [Pushover](src/Pushover/README.md)
- [PushPlus](src/PushPlus/README.md)
- [QQ](src/QQ/README.md)
- [RocketChat](src/RocketChat/README.md)
- [ServerChan](src/ServerChan/README.md)
- [ShowdocPush](src/ShowdocPush/README.md)
- [SimplePush](src/SimplePush/README.md)
- [Slack](src/Slack/README.md)
- [Telegram](src/Telegram/README.md)
- [WeWork](src/WeWork/README.md)
- [WPush](src/WPush/README.md)
- [XiZhi](src/XiZhi/README.md)
- [YiFengChuanHua](src/YiFengChuanHua/README.md)
- [ZohoCliq](src/ZohoCliq/README.md)
- [ZohoCliqWebHook](src/ZohoCliqWebHook/README.md)
- [Zulip](src/Zulip/README.md)

Related repositories
--------------------

[](#related-repositories)

-
-

Requirement
-----------

[](#requirement)

- PHP &gt;= 8.2

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

[](#installation)

```
composer require guanguans/notify -v
```

Usage example
-------------

[](#usage-example)

### Quick start

[](#quick-start)

```
$response = (new Guanguans\Notify\DingTalk\Client(
        new Guanguans\Notify\DingTalk\Authenticator('c44fec1ddaa8a833156efb77b7865d62ae13775418030d94d05da08bfca73')
    ))
    ->send(
        Guanguans\Notify\DingTalk\Messages\BtnsActionCardMessage::make([
            'title' => 'This is title(keyword).',
            'text' => 'This is text.',
        ])
    )
    // ->dump()
    ->json();
```

```
// 1. Create authenticator
$authenticator = new Guanguans\Notify\DingTalk\Authenticator(
    'c44fec1ddaa8a833156efb77b7865d62ae13775418030d94d05da08bfca73',
    // 'SECc32bb7345c0f73da2b9786f0f7dd5083bd768a29b82e6d460149d730eee51'
);

// 2. Create client
$client = new Guanguans\Notify\DingTalk\Client($authenticator);

// 3. Create message
$message = Guanguans\Notify\DingTalk\Messages\BtnsActionCardMessage::make([
    'title' => 'This is title(keyword).',
    'text' => 'This is text.',
    // 'btnOrientation' => 1,
    // 'btns' => [
    //     [
    //         'title' => 'This is title 1.',
    //         'actionURL' => 'https://github.com/guanguans/notify',
    //     ],
    // ],
])
    ->btnOrientation(1)
    ->addBtn([
        'title' => 'This is title 2.',
        'actionURL' => 'https://github.com/guanguans/notify',
    ]);

// 4. Send message
$response = $client
    // ->baseUri('base-uri')
    // ->connectTimeout(10)
    // ->debug(true)
    // ->proxy('http://127.0.0.1:1087')
    // ->timeout(30)
    // ->verify(false)
    // ->push(
    //     GuzzleHttp\Middleware::log(
    //         new Psr\Log\NullLogger,
    //         new GuzzleHttp\MessageFormatter(GuzzleHttp\MessageFormatter::DEBUG)
    //     ),
    //     'log'
    // )
    // ->before(
    //     'log',
    //     GuzzleHttp\Middleware::mapRequest(
    //         static fn (Psr\Http\Message\RequestInterface $request) => $request
    //     ),
    // )
    ->send($message)
    ->dump()
    // ->throw()
    ->json();
```

### Asynchronous requests

[](#asynchronous-requests)

```
$promise = $client->sendAsync($message);
$response = $promise->wait();
```

### Concurrent requests

[](#concurrent-requests)

```
/** @var iterable $messages */
/** @var array $responses */
$responses = $client->pool($messages);
```

### Hyperf integration

[](#hyperf-integration)

```
use Guanguans\Notify\Foundation\Client;
use GuzzleHttp\HandlerStack;
use Hyperf\Guzzle\CoroutineHandler;
use Hyperf\Guzzle\HandlerStackFactory;
use Hyperf\Guzzle\PoolHandler;

// Set Handler directly
// $client->setHandler(make(CoroutineHandler::class));
// $client->setHandler(make(PoolHandler::class));
$client->setHandler((fn () => $this->getHandler($this->option))->call(new HandlerStackFactory));

// Or set HandlerStackResolver
$client->setHandlerStackResolver(static fn (Client $client): HandlerStack => array_reduce(
    $client->defaultMiddlewares(),
    static fn (HandlerStack $handlerStack, callable $middleware) => tap($handlerStack)->push($middleware),
    (new HandlerStackFactory)->create()
));
```

### Completion

[](#completion)

Tip

Required to install [Laravel Idea](https://plugins.jetbrains.com/plugin/13441-laravel-idea) plugin.

[![completion](docs/completion.jpg)](docs/completion.jpg)

Composer scripts
----------------

[](#composer-scripts)

```
composer checks:required
composer notify:generate-ide-json
composer notify:platform-lint
composer php-cs-fixer:fix
composer test
```

Benchmark
---------

[](#benchmark)

```
composer benchmark
```

```
+---------------------+--------------------------+-----+-------+-----+----------+-----------+--------+
| benchmark           | subject                  | set | revs  | its | mem_peak | mode      | rstdev |
+---------------------+--------------------------+-----+-------+-----+----------+-----------+--------+
| SendMessageBench    | benchSendMessage         |     | 10000 | 3   | 6.432mb  | 156.609μs | ±0.33% |
| CreateInstanceBench | benchCreateAuthenticator |     | 10000 | 3   | 5.208mb  | 0.657μs   | ±0.68% |
| CreateInstanceBench | benchCreateMessage       |     | 10000 | 3   | 5.208mb  | 1.769μs   | ±0.20% |
| CreateInstanceBench | benchCreateClient        |     | 10000 | 3   | 82.791mb | 13.827μs  | ±0.40% |
+---------------------+--------------------------+-----+-------+-----+----------+-----------+--------+
```

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)

- [guanguans](https://github.com/guanguans)
- [All Contributors](../../contributors)

Thanks
------

[](#thanks)

[![](https://camo.githubusercontent.com/3cf726e7cdadba47755b7f7ea4227945a92a2fa48aadf4a2573140ec6501c989/68747470733a2f2f7265736f75726365732e6a6574627261696e732e636f6d2f73746f726167652f70726f64756374732f636f6d70616e792f6272616e642f6c6f676f732f6a625f6265616d2e737667)](https://www.jetbrains.com/?from=https://github.com/guanguans)

License
-------

[](#license)

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

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance89

Actively maintained with recent releases

Popularity54

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 80.5% 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 ~12 days

Total

145

Last Release

61d ago

Major Versions

1.x-dev → 2.0.0-beta12024-02-19

2.x-dev → 3.0.02025-02-23

3.x-dev → 4.0.02026-02-10

PHP version history (5 changes)v1.0.0PHP &gt;=7.2

v1.0.2PHP &gt;=7.2.5

2.0.0-beta1PHP &gt;=7.4

3.0.0PHP &gt;=8.0

4.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![guanguans](https://avatars.githubusercontent.com/u/22309277?v=4)](https://github.com/guanguans "guanguans (1097 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (151 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (112 commits)")[![ricardoapaes](https://avatars.githubusercontent.com/u/38794747?v=4)](https://github.com/ricardoapaes "ricardoapaes (2 commits)")[![teakong](https://avatars.githubusercontent.com/u/14220133?v=4)](https://github.com/teakong "teakong (1 commits)")

---

Tags

barkdingtalkdiscordgittergooglechatlarkmattermostmicrosoftteamsnotificationntfypushpushbackpushoverqqrocketchatslacktelegramweworkzohocliqzulipsdkpushservernotificationnotifierslackbottelegramnotifyqqgitterdingtalkdiscordserverChanMattermostrocketchatNtfyzulippushoverpushbulletsimplepushlarkweworkBarkchanifyxiZhigoogleChatpushPluspushBackiGotPushDeerMicrosoftTeamsNowPushShowdocPushYiFengChuanHuaAnPushWPushPushMeZohoCliqZohoCliqWebHook

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/guanguans-notify/health.svg)

```
[![Health](https://phpackages.com/badges/guanguans-notify/health.svg)](https://phpackages.com/packages/guanguans-notify)
```

###  Alternatives

[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[bentools/webpush-bundle

Send push notifications through Web Push Protocol to your Symfony users.

71274.3k](/packages/bentools-webpush-bundle)[joetannenbaum/phpushbullet

PHP API wrapper for Pushbullet.

3146.4k4](/packages/joetannenbaum-phpushbullet)[sly/pushover

A PHP library for easy PushOver service use: send real-time notifications to your Android and iOS devices.

3431.6k2](/packages/sly-pushover)

PHPackages © 2026

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