PHPackages                             mascame/hooky - 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. mascame/hooky

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

mascame/hooky
=============

1.1.0(9y ago)017MITPHPPHP &gt;=5.4.0

Since Oct 30Pushed 9y ago1 watchersCompare

[ Source](https://github.com/marcmascarell/hooky)[ Packagist](https://packagist.org/packages/mascame/hooky)[ Docs](https://github.com/marcmascarell/hooky)[ RSS](/packages/mascame-hooky/feed)WikiDiscussions master Synced 4w ago

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

Hooky
=====

[](#hooky)

[![Packagist](https://camo.githubusercontent.com/a776efce80b62fb770fd4aaf3541f8a8d437758bf562b11fa130bfca63228a7d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617363616d652f686f6f6b792e7376673f6d61784167653d323539323030303f7374796c653d706c6173746963)](https://packagist.org/packages/mascame/hooky)[![Travis](https://camo.githubusercontent.com/e33b0d0663fb977332aeab62e9f303212c14de9627f3835e7fe289bbac2abe0c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d6172636d6173636172656c6c2f686f6f6b792e7376673f6d61784167653d323539323030303f7374796c653d706c6173746963)](https://travis-ci.org/marcmascarell/hooky)[![license](https://camo.githubusercontent.com/b7041ba7347252154a63f1226780c89d5eb9993da4842134e106dab39741d0c5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6172636d6173636172656c6c2f686f6f6b792e7376673f6d61784167653d323539323030303f7374796c653d706c6173746963)](https://github.com/marcmascarell/hooky)

Simple hooks.

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

[](#installation)

`composer require mascame/hooky`

Usage
-----

[](#usage)

`MyHook.php`

```
class MyHook implements \Mascame\Hooky\HookContract {

    public function handle($data, $next)
    {
        $data = 'test';

        return $next($data);
    }

}
```

`somewhere.php`

```
$hook = new \Mascame\Hooky\Hook();
$hookName = 'bar';
$someData = 'foo'; // This will be sent to handlers, where they can manipulate it

$hook->to($hookName, [MyHook::class, AnotherHook::class]);

$data = $hook->fire($hookName, $someData);
```

Contributing
------------

[](#contributing)

Thank you for considering contributing! You can contribute at any time forking the project and making a pull request.

Support
-------

[](#support)

If you need help or any kind of support, please send an e-mail to Marc Mascarell at .

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3528d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9570e08dbb97ee61a22ae78624fd6b86ce62e0a89120fe40b5bde23d4a22eb6d?d=identicon)[marcmascarell](/maintainers/marcmascarell)

---

Top Contributors

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

---

Tags

hooksHOOK

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/mascame-hooky/health.svg)

```
[![Health](https://phpackages.com/badges/mascame-hooky/health.svg)](https://phpackages.com/packages/mascame-hooky)
```

###  Alternatives

[tormjens/eventy

The WordPress filter/action system in Laravel

438937.3k23](/packages/tormjens-eventy)[larapack/hooks

A Laravel Hook system

2141.5M21](/packages/larapack-hooks)[larapack/voyager-hooks

Hooks integrated in Voyager

2041.5M28](/packages/larapack-voyager-hooks)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.6M144](/packages/ramsey-conventional-commits)[bainternet/php-hooks

A fork of the WordPress filters hook system rolled in to a class to be ported into any PHP-based system

27623.1k5](/packages/bainternet-php-hooks)[jbzoo/event

Library for event-based development

27776.8k5](/packages/jbzoo-event)

PHPackages © 2026

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