PHPackages                             epictest/hawk.php - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. epictest/hawk.php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

epictest/hawk.php
=================

PHP errors Catcher module for Hawk.so

2.1.9(4y ago)05MITPHPPHP ^7.2

Since Sep 28Pushed 3y agoCompare

[ Source](https://github.com/gdkv/hawk.php)[ Packagist](https://packagist.org/packages/epictest/hawk.php)[ RSS](/packages/epictest-hawkphp/feed)WikiDiscussions master Synced 1mo ago

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

Hawk PHP
========

[](#hawk-php)

PHP errors Catcher for [Hawk.so](https://hawk.so).

[![](https://camo.githubusercontent.com/64198bfe8eac3f850ad9da319768d05fd1dbd3500e1b9b7cfa0871474945b818/68747470733a2f2f636170656c6c612e706963732f696d6167652f34633665356665652d646137652d346263352d613839382d663139643132616362303035)](https://camo.githubusercontent.com/64198bfe8eac3f850ad9da319768d05fd1dbd3500e1b9b7cfa0871474945b818/68747470733a2f2f636170656c6c612e706963732f696d6167652f34633665356665652d646137652d346263352d613839382d663139643132616362303035)

Setup
-----

[](#setup)

1. [Register](https://garage.hawk.so/sign-up) an account, create a Project and get an Integration Token.
2. Install SDK via [composer](https://getcomposer.org) to install the Catcher

Catcher provides support for PHP 7.2 or later

```
$ composer require codex-team/hawk.php
```

### Configuration

[](#configuration)

```
\Hawk\Catcher::init([
    'integrationToken' => 'your integration token'
]);
```

After initialization you can set `user` or `context` for any event that will be send to Hawk

```
\Hawk\Catcher::get()
    ->setUser([
        'name' => 'user name',
        'photo' => 'user photo',
    ])
    ->setContext([
        ...
    ]);
```

### Send events and exceptions manually

[](#send-events-and-exceptions-manually)

Use `sendException` method to send any caught exception

```
try {
    throw new Exception("Error Processing Request", 1);
} catch (Exception $e) {
    \Hawk\Catcher::get()->sendException($e);
}
```

Use `sendEvent` method to send any data (logs, notices or something else)

```
\Hawk\Catcher::get()->sendMessage('your message', [
    ... // Context
]);
```

### Filtering sensitive information

[](#filtering-sensitive-information)

Use the `beforeSend` hook to filter any data you don't want to send to Hawk. Use setters to clear any property.

```
\Hawk\Catcher::init([
    // ...
    'beforeSend' => function (\Hawk\EventPayload $eventPayload) {
        $user = $eventPayload->getUser();

        if (!empty($user['email'])){
            unset($user['email']);

            $eventPayload->setUser($user);
        }

        return $eventPayload;
    }
]);
```

Issues and improvements
-----------------------

[](#issues-and-improvements)

Feel free to ask questions or improve the project.

Links
-----

[](#links)

Repository:

Report a bug:

Composer Package:

CodeX Team:

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~49 days

Total

17

Last Release

1545d ago

Major Versions

v1.2.1 → 2.0.02021-04-05

PHP version history (4 changes)1.0PHP &gt;=5.6

v1.1PHP &gt;=5.3

2.0.0PHP ^7.1

2.1.6PHP ^7.2

### Community

Maintainers

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

---

Top Contributors

[![khaydarov](https://avatars.githubusercontent.com/u/6507765?v=4)](https://github.com/khaydarov "khaydarov (101 commits)")[![talyguryn](https://avatars.githubusercontent.com/u/15259299?v=4)](https://github.com/talyguryn "talyguryn (78 commits)")[![n0str](https://avatars.githubusercontent.com/u/988885?v=4)](https://github.com/n0str "n0str (13 commits)")[![ilyatos](https://avatars.githubusercontent.com/u/25087524?v=4)](https://github.com/ilyatos "ilyatos (9 commits)")[![gdkv](https://avatars.githubusercontent.com/u/9191921?v=4)](https://github.com/gdkv "gdkv (3 commits)")[![neSpecc](https://avatars.githubusercontent.com/u/3684889?v=4)](https://github.com/neSpecc "neSpecc (2 commits)")

---

Tags

phperrormonologhawkcatcher

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/epictest-hawkphp/health.svg)

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

###  Alternatives

[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[codex-team/hawk.php

PHP errors Catcher module for Hawk.so

2230.1k2](/packages/codex-team-hawkphp)[logtail/monolog-logtail

Logtail handler for Monolog

233.2M3](/packages/logtail-monolog-logtail)[shalvah/monolog-pusher

Monolog handler for sending logs to Pusher

1223.5k](/packages/shalvah-monolog-pusher)[silverleague/logviewer

View your SilverStripe logs from inside the CMS

114.6k](/packages/silverleague-logviewer)

PHPackages © 2026

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