PHPackages                             russbalabanov/slack-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. russbalabanov/slack-notifier

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

russbalabanov/slack-notifier
============================

Slack notification tool

v1.0.5(5y ago)05.9kMITPHPPHP ^7.1.3|^8.0

Since Dec 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/RuSS-B/slack-notifier)[ Packagist](https://packagist.org/packages/russbalabanov/slack-notifier)[ RSS](/packages/russbalabanov-slack-notifier/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (6)Dependencies (3)Versions (6)Used By (0)

Slack notifier
==============

[](#slack-notifier)

Slack notifier is a PHP library that helps you send your monolog data into slack. Whether you need to log errors or exceptions, get nice looking debug data as a message Slack notifier is for you.

Mainly it was developed for Symfony framework but since it is a library you can use it with different frameworks as well

Slack notifier requires PHP &gt;= 7.1.

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

[](#installation)

```
composer require russbalabanov/slack-notifier
```

Make sure to pass `SLACK_NOTIFIER_DEFAULT_HOOK_URL` ENV with a slack hook url. This is a fallback url when other urls are not specified A full list of ENV's is [here](#full-list-of-hook-urls)

Basic Usage
-----------

[](#basic-usage)

```
$logger = new Monolog\Logger('default', [new \SlackNotifier\Handler\Handler()]);
$log->error('Some error goes here!');

```

### Adding attachments manually

[](#adding-attachments-manually)

```
use SlackNotifier\Handler\Handler;
use SlackNotifier\Handler\Attachment;
use SlackNotifier\Handler\Field;

$logger = new Monolog\Logger('default', [new Handler()]);

$attachment = (new Attachment('color'))
    ->addField(new Field('Foo', 'Bar', true))
    ->addField(new Field('Baz', 'Zaz', true));

$logger->error('A simple error', [
    'attachments' => [
        $attachment
    ]
]);

```

Symfony Integration
-------------------

[](#symfony-integration)

Integration with Symfony framework is really simple. Just go to your `config` (if you are using SF4+) select a folder with desired environment, for example prod and modify your monolog.yaml file like this

```
monolog:
  handlers:
    slack:
      type: service
      id: SlackNotifier\Handler\Handler

```

And make sure to add this line to your `services.yaml` file

```
SlackNotifier\Handler\Handler:

```

in case you want to skip some http status codes it can be achived this way

```
    SlackNotifier\Handler\Handler:
        arguments:
            $config: {'skipHttpCodes' : [404, 405]}

```

Full list of Hook urls
----------------------

[](#full-list-of-hook-urls)

```
SLACK_NOTIFIER_EMERGENCY_HOOK
SLACK_NOTIFIER_ALERT_HOOK
SLACK_NOTIFIER_CRITICAL_HOOK
SLACK_NOTIFIER_ERROR_HOOK
SLACK_NOTIFIER_WARNING_HOOK
SLACK_NOTIFIER_NOTICE_HOOK
SLACK_NOTIFIER_INFO_HOOK
SLACK_NOTIFIER_DEBUG_HOOK

```

License
-------

[](#license)

Slack notifier is released under the MIT Licence. See the bundled LICENSE file for details.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity70

Established project with proven stability

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

Total

5

Last Release

1861d ago

PHP version history (2 changes)1.0.1PHP ^7.1.3

v1.0.3PHP ^7.1.3|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/93617466?v=4)[Руслан](/maintainers/RussDeveloper)[@RussDeveloper](https://github.com/RussDeveloper)

---

Top Contributors

[![RuSS-B](https://avatars.githubusercontent.com/u/3403762?v=4)](https://github.com/RuSS-B "RuSS-B (21 commits)")

### Embed Badge

![Health badge](/badges/russbalabanov-slack-notifier/health.svg)

```
[![Health](https://phpackages.com/badges/russbalabanov-slack-notifier/health.svg)](https://phpackages.com/packages/russbalabanov-slack-notifier)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[pimcore/pimcore

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

3.8k3.8M464](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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