PHPackages                             x00/ntfy-php - 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. x00/ntfy-php

ActiveComposer-plugin[Mail &amp; Notifications](/categories/mail)

x00/ntfy-php
============

Send notifications to your phone in one line via Ntfy.sh for Symfony

v2.3.10(3mo ago)045Apache-2.0PHPPHP &gt;=7.4

Since Jan 20Pushed 3mo agoCompare

[ Source](https://github.com/hbdeveloppeur/Ntfy-php)[ Packagist](https://packagist.org/packages/x00/ntfy-php)[ RSS](/packages/x00-ntfy-php/feed)WikiDiscussions main Synced 1mo ago

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

Notify via Ntfy.sh (PHP Library)
================================

[](#notify-via-ntfysh-php-library)

Send notifications to your phone in one line via [ntfy.sh](https://ntfy.sh).

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

[](#installation)

Install the package via Composer:

```
composer require x00/ntfy-php
```

Note

During installation, you may be asked to allow the `x00/ntfy-php` plugin. This is required to automatically generate the configuration file.

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

[](#configuration)

The library now supports **zero-configuration** for Symfony projects.

### Automatic Notifications Channels (Symfony)

[](#automatic-notifications-channels-symfony)

Upon installation, a default configuration file is automatically created at `config/packages/ntfy.yaml`. You just need to update it with your channel IDs:

```
ntfy:
    silent: false # Optional: If true, swallows exceptions on failure. Default: false
    channels:
        error:
            id: 'your-error-channel-id'
            dev_only: true
        log:
            id: 'your-log-channel-id'
            dev_only: true # Optional: Only send in 'dev' environment
        urgent:
            id: 'your-urgent-channel-id'
            dev_only: false
```

### Environment Variables

[](#environment-variables)

Alternatively, you can use environment variables without any configuration file:

- `NTFY_ERROR_CHANNEL`
- `NTFY_LOG_CHANNEL`
- `NTFY_URGENT_CHANNEL`

Usage
-----

[](#usage)

Use the `Ntfy\Core\Ntfy` interface to send notifications.

### Regular Notifications

[](#regular-notifications)

```
use Ntfy\Core\Ntfy;

class MyService
{
    public function __construct(
        private Ntfy $notifier
    ) {}

    public function doSomething()
    {
        // Send to log channel
        $this->notifier->send(message: 'Something happened');

        // Send with data
        $this->notifier->send(message: 'Something happened', data: ['key' => 'value']);

        // Send to specific channel
        $this->notifier->send(message: 'Something happened', channelId: 'my-custom-channel-id', data: ['key' => 'value']);
    }
}
```

### Exception Notifications

[](#exception-notifications)

```
try {
    // ...
} catch (\Throwable $e) {
    $this->notifier->exception($e, ['user_id' => 123, 'context' => 'foo']);
}
```

### Urgent Notifications

[](#urgent-notifications)

```
$this->notifier->urgent(new \Exception('Server is down!'));
```

License
-------

[](#license)

Apache-2.0

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance79

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

19

Last Release

110d ago

Major Versions

v1.0.0 → v2.0.02026-01-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/07dc5da4364fe492c613c0cbad3b91774754365c4502b2e4962d5d6669a720a1?d=identicon)[hbdeveloppeur](/maintainers/hbdeveloppeur)

---

Top Contributors

[![hbdeveloppeur](https://avatars.githubusercontent.com/u/5682419?v=4)](https://github.com/hbdeveloppeur "hbdeveloppeur (26 commits)")

### Embed Badge

![Health badge](/badges/x00-ntfy-php/health.svg)

```
[![Health](https://phpackages.com/badges/x00-ntfy-php/health.svg)](https://phpackages.com/packages/x00-ntfy-php)
```

###  Alternatives

[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[php-flasher/flasher-symfony

Integrate flash notifications into Symfony projects effortlessly with PHPFlasher. Improve user experience and application feedback loops easily.

141.3M20](/packages/php-flasher-flasher-symfony)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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