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(4y ago)05.9kMITPHPPHP ^7.1.3|^8.0

Since Dec 11Pushed 4y 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 today

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 72% 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

1812d ago

PHP version history (2 changes)1.0.1PHP ^7.1.3

v1.0.3PHP ^7.1.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc71e7a289076db0625de91c8e8dd98e64b60370fc8aecc13639227a7f8119ca?d=identicon)[RussDeveloper](/maintainers/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.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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