PHPackages                             deslynx/alert-bundle - 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. deslynx/alert-bundle

ActiveSymfony-bundle[Mail &amp; Notifications](/categories/mail)

deslynx/alert-bundle
====================

Send alert email service and specialized Monolog handler

v1.1.1(1y ago)149MITPHPPHP ^7.4 || ^8.0

Since Jul 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/DesLynx/alert-bundle)[ Packagist](https://packagist.org/packages/deslynx/alert-bundle)[ RSS](/packages/deslynx-alert-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (4)Used By (0)

AlertBundle
===========

[](#alertbundle)

[![Latest stable version](https://camo.githubusercontent.com/8188ea2de6b73b04b87475332f99c3722b1e61976a7e7ac501edcd85489546ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4465734c796e782f616c6572742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/deslynx/alert-bundle)[![License](https://camo.githubusercontent.com/56097e1d638e2d420a44243b317f5e87f200ab6cad6ef29d69edebb9d1d40896/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f4465734c796e782f616c6572742d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/deslynx/alert-bundle)[![PHPStan Enabled](https://camo.githubusercontent.com/a44af5fc39484990738cc4bd3874d884a42afdeed470b34a010e77bb8341ef31/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://phpstan.org/)[![PHPStan Level max](https://camo.githubusercontent.com/cc67a749382c01c47654db8925f8f4366f5967088ac90071326ba6844a15cf43/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c5f6d61782d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://phpstan.org/)

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
composer require deslynx/alert-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
composer require deslynx/alert-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    DesLynx\AlertBundle\DesLynxAlertBundle::class => ['all' => true],
];
```

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

[](#configuration)

```
# /config/packages/deslynx_alert.yaml
deslynx_alert:

    # The sender of the email, like "Name " or a simple email.
    from: ~ # Required

    # A list of always added recipients for the email, like "Name " or a simple email.
    to: [] # Required

    # Your project name. Included in the email subject
    projectName: 'My project'

    # If you want to use a custom email transport set this to the name of the transport.
    transport: null

# If you need another configuration for specific environments you can overwrite some configs
#when@dev:
#  deslynx_alert:
#    from: ~
#    to: []
#    projectName: 'My project'
#    transport: null
```

Important note
--------------

[](#important-note)

This bundle rely on the [Symfony Mailer](https://symfony.com/doc/current/mailer.html) component for sending email so be sure to have it configured.

Usage (service)
---------------

[](#usage-service)

This bundle provide a single service for sending an alert email which you can autowire by using the `AlertHelper` type-hint:

```
// src/Controller/SomeController.php

use DesLynx\AlertBundle\Service\AlertHelper;
//...

class SomeController
{
    public function index(AlertHelper $alertHelper) {
        $alertHelper->sendAlert(
            'A significant subject.',
            'A significant message. Either text or HTML.',
            false, // Optional. Set to true if the message is HTML
            ['email1@address.com', 'email2@address.com' /*, ...*/] // Optional. A list of recipients to add in cc in addition to the globally defined recipients (see configuration)
         );
    }
}
```

Usage (Monolog Handler)
-----------------------

[](#usage-monolog-handler)

This bundle provide a Monolog Handler using the `AlertHelper` service. It allows to add a monolog handler config to send an alert email with the full log stack on every critical error happening in the project.

To enable this functionality, require the [MonologBundle](https://symfony.com/doc/current/logging.html#monolog) if not already done then just add this to your monolog config:

```
# config/packages/monolog.yaml
monolog:
  handlers:
    # ...
    deslynx_critical:
      type: fingers_crossed
      action_level: critical
      handler: deslynx_deduplicated
    deslynx_deduplicated:
      type: deduplication
      handler: deslynx_alert_mailer
    deslynx_alert_mailer:
      type: service
      id: DesLynx\AlertBundle\Monolog\Handler\AlertMailerHandler
      level: debug
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

3

Last Release

670d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/deslynx-alert-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/deslynx-alert-bundle/health.svg)](https://phpackages.com/packages/deslynx-alert-bundle)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

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

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[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)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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