PHPackages                             bentools/stoppable-event-trait - 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. bentools/stoppable-event-trait

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bentools/stoppable-event-trait
==============================

PSR-14 Stoppable Event implementation, shipped as a trait.

1.0(3y ago)019MITPHPPHP &gt;=7.2.0

Since Jan 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bpolaszek/stoppable-event-trait)[ Packagist](https://packagist.org/packages/bentools/stoppable-event-trait)[ Docs](https://github.com/bentools/stoppable-event-trait)[ GitHub Sponsors](https://github.com/bpolaszek)[ RSS](/packages/bentools-stoppable-event-trait/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

PSR-14 Stoppable Event implementation, shipped as a trait.
==========================================================

[](#psr-14-stoppable-event-implementation-shipped-as-a-trait)

[![Latest Version on Packagist](https://camo.githubusercontent.com/111d23eeaa905b99f18cc2049c2150c741b2d66c586ade8b11d531e8cf627a04/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62656e746f6f6c732f73746f707061626c652d6576656e742d74726169742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bentools/stoppable-event-trait)[![Total Downloads](https://camo.githubusercontent.com/3b773cbb1198b188b0cd6b9a389ecd37bc6e576095405342be8431dadcf82bd4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62656e746f6f6c732f73746f707061626c652d6576656e742d74726169742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bentools/stoppable-event-trait)[![Tests](https://github.com/bpolaszek/stoppable-event-trait/actions/workflows/run-tests.yml/badge.svg)](https://github.com/bpolaszek/stoppable-event-trait/actions/workflows/run-tests.yml)[![Coverage](https://camo.githubusercontent.com/6d3231f8cc126bbeeb5bb65c77fd084b5888b40fe81b17848d3727b5d037152d/68747470733a2f2f636f6465636f762e696f2f67682f62706f6c61737a656b2f73746f707061626c652d6576656e742d74726169742f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4c35756c5461796d6274)](https://codecov.io/gh/bpolaszek/stoppable-event-trait)

This is just a trait implementation of PSR-14's `StoppableEventInterface`.

Usage
-----

[](#usage)

```
use Bentools\StoppableEventTrait\StoppableEventTrait;
use Psr\EventDispatcher\StoppableEventInterface;

final class StoppableEvent implements StoppableEventInterface
{
    use StoppableEventTrait;
}
```

Any listener can call `$event->stopPropagation()` on your event, preventing further propagation of the event, regardless of the PSR-14 implementation you're using (as soon as they properly handle `StoppableEventInterface` events)

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

[](#installation)

You can install the package via composer:

```
composer require bentools/stoppable-event-trait
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

1219d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

bentoolsstoppable-event-trait

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/bentools-stoppable-event-trait/health.svg)

```
[![Health](https://phpackages.com/badges/bentools-stoppable-event-trait/health.svg)](https://phpackages.com/packages/bentools-stoppable-event-trait)
```

PHPackages © 2026

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