PHPackages                             martynbiz/php-flash-message - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. martynbiz/php-flash-message

ActiveLibrary[Queues &amp; Workers](/categories/queues)

martynbiz/php-flash-message
===========================

Flash messenger that will keep messages until they are "flushed" - current or persistant states.

1.0.0(10y ago)0258MITPHPPHP &gt;=5.3.0

Since Jan 21Pushed 9y ago2 watchersCompare

[ Source](https://github.com/martynbiz/php-flash-message)[ Packagist](https://packagist.org/packages/martynbiz/php-flash-message)[ Docs](http://github.com/martynbiz/php-flash)[ RSS](/packages/martynbiz-php-flash-message/feed)WikiDiscussions master Synced 3w ago

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

Flash
=====

[](#flash)

Flash messenger that will keep messages until they are "flushed" - current or persistant states.

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

[](#installation)

Composer

```
"require-dev": {
    "martynbiz/php-flash-message": "dev-master"
}
```

Usage
-----

[](#usage)

Add message

```
$flash = new \MartynBiz\FlashMessage\Flash;
$flash->addMessage('success', 'You have successfully registered');
```

Check if message exists by key

```
$flash->has('success'); // true
$flash->has('errors'); // false
```

Flush messages

This method can be called during the same HTTP request or future request. This means it is useful when redirecting but also forwarding to, for example, another controller action. The contents of the container will be emptied when this method is called once.

```
$messages = $flash->flushMessages();
```

Using custom storage
--------------------

[](#using-custom-storage)

It is possible to use your own storage object, as long as it implements ArrayAccess interface. Below Zend\\Storage\\Container has been used:

```
$container = new Zend\Session\Container('mycontainer');
$flash = new Flash($container);
```

TODO

- create a simple session storage as default

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

3807d ago

### Community

Maintainers

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

---

Tags

messageflash

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/martynbiz-php-flash-message/health.svg)

```
[![Health](https://phpackages.com/badges/martynbiz-php-flash-message/health.svg)](https://phpackages.com/packages/martynbiz-php-flash-message)
```

###  Alternatives

[php-amqplib/php-amqplib

Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.

4.6k129.9M973](/packages/php-amqplib-php-amqplib)[aws/aws-php-sns-message-validator

Amazon SNS message validation for PHP

21522.7M111](/packages/aws-aws-php-sns-message-validator)

PHPackages © 2026

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