PHPackages                             trash-panda/m2-message-manager-remover - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. trash-panda/m2-message-manager-remover

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

trash-panda/m2-message-manager-remover
======================================

Remove messages from the message manager

1.0.0(6y ago)10MITPHPPHP ^7.2

Since Dec 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/AydinHassan/m2-message-manager-remover)[ Packagist](https://packagist.org/packages/trash-panda/m2-message-manager-remover)[ RSS](/packages/trash-panda-m2-message-manager-remover/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (2)Used By (0)

Magento 2 Message Manager Remover
=================================

[](#magento-2-message-manager-remover)

 [ ![](https://camo.githubusercontent.com/dfd6d7a1a7411ff3debe3dbf88266672818d6b8f7eae37b48f3119536af36193/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f417964696e48617373616e2f6d322d6d6573736167652d6d616e616765722d72656d6f7665722f6d61737465722e7376673f7374796c653d666c61742d737175617265266c6162656c3d4c696e7578) ](https://travis-ci.org/AydinHassan/m2-message-manager-remover "Build Status")

A small utility to remove messages added to the message manager

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

[](#installation)

```
$ composer require trash-panda/m2-message-manager-remover
$ php bin/magento setup:upgrade
```

Usage
-----

[](#usage)

Inject `\TrashPanda\MessageManagerRemover\Remover` wherever you need to remove a message. The class has two public methods for removing messages.

`removeLastAddedMessage` will remove the last added message or throw a \\RuntimeException if one does not exist `removeByRegex` will remove all message matching a given `preg_match` compatible regex. It will return the number of messages removed 'removeAll' will remove all messages from the message manager

Examples
--------

[](#examples)

```
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$messageManager = $om->create(\Magento\Framework\Message\ManagerInterface::class);

$messageManager->addNotice('First message');
$messageManager->addNotice('Second message');

$remover = new Remover($messageManager);
$remover->removeLastAddedMessage(); //only remove "Second Message"
$remover->removeByRegex('/message/'); //remove all message matching regex '/message/'
$remover->removeAll(); //remove all messages
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

2329d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/421c0adaa533effb16310b34396c544663167970aa9eb6940edb6ed1917c963d?d=identicon)[AydinHassan](/maintainers/AydinHassan)

---

Top Contributors

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

---

Tags

magento2magento2-module

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/trash-panda-m2-message-manager-remover/health.svg)

```
[![Health](https://phpackages.com/badges/trash-panda-m2-message-manager-remover/health.svg)](https://phpackages.com/packages/trash-panda-m2-message-manager-remover)
```

###  Alternatives

[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[tig/postnl-magento2

TIG Magento 2 PostNL extension

58544.2k4](/packages/tig-postnl-magento2)[lillik/magento2-price-decimal

Magento 2 Price Decimal Precision

111147.5k](/packages/lillik-magento2-price-decimal)[nosto/module-nostotagging

Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.

27659.1k4](/packages/nosto-module-nostotagging)[magepal/magento2-customeraccountlinksmanager

Customer Account Links Manager for Magento2 allows you to quickly and easily remove unwanted links from customer account dashboard

4084.9k](/packages/magepal-magento2-customeraccountlinksmanager)[doofinder/doofinder-magento2

Doofinder module for Magento 2

13204.0k1](/packages/doofinder-doofinder-magento2)

PHPackages © 2026

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