PHPackages                             xinningsu/yii2-raygun - 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. xinningsu/yii2-raygun

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

xinningsu/yii2-raygun
=====================

Raygun Yii2 logger, Raygun integration for Yii2.

v1.0.0(8mo ago)01MITPHPPHP &gt;=8.0

Since Aug 21Pushed 8mo agoCompare

[ Source](https://github.com/xinningsu/yii2-raygun)[ Packagist](https://packagist.org/packages/xinningsu/yii2-raygun)[ Docs](https://github.com/xinningsu/yii2-raygun)[ RSS](/packages/xinningsu-yii2-raygun/feed)WikiDiscussions master Synced 1mo ago

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

Raygun Error Logger for Yii2
============================

[](#raygun-error-logger-for-yii2)

Raygun integration for Yii2, Raygun Error Logger.

[![MIT licensed](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](./LICENSE)[![Build Status](https://camo.githubusercontent.com/6cd29689f98434548d872e441c02c776ff40f728fcd29e79b95ae483ab9a13f8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78696e6e696e6773752f796969322d72617967756e2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xinningsu/yii2-raygun/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/73da1512cefd9b532146d67a882356333413bbd90064bbcda46235bc09cc0e3b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78696e6e696e6773752f796969322d72617967756e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xinningsu/yii2-raygun/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6002de815e374c4222e35715545b736650986f4207a135da46db150aafc0b395/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78696e6e696e6773752f796969322d72617967756e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xinningsu/yii2-raygun)[![Code Intelligence Status](https://camo.githubusercontent.com/d7228a487cc0a6964c05d543e0a02fd23cf10f90509d95420e884ce9c8ffc01e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78696e6e696e6773752f796969322d72617967756e2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/g/xinningsu/yii2-raygun)

Installation
============

[](#installation)

```
composer require xinningsu/yii2-raygun

```

Usage
=====

[](#usage)

Once you have finished the Raygun installation, set up Raygun component and Raygun log target in Yii common config file, e.g., `config/web.php`:

```
[
    // ...
    'components' => [
        // ...
        'raygun' => [
            'class' => \Sulao\YiiRaygun\RaygunComponent::class,
            'config' => [
                'api_key' => 'your_raygun_api_key', // Update with your Raygun API key
                // For more configuration options, please refer to
                // https://github.com/xinningsu/yii2-raygun/blob/master/config/raygun.php
            ],
        ],
        'log' => [
            // ...
            'targets' => [
                // ...
                [
                    'class' => \Sulao\YiiRaygun\RaygunTarget::class,
                    'levels' => ['error', 'warning'],
                    'except' => [
                        \yii\web\HttpException::class,
                    ],
                ],
            ],
        ],
        // ...
    ],
    // ...
],
```

Testing
=======

[](#testing)

In the `controller` file, add the code below

```
\Yii::error('test error');;
```

Or trigger an exception

```
throw new \Exception('test exception');
```

Then, check if the report is available in the Raygun Crash Reporting.

License
=======

[](#license)

[MIT](./LICENSE)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance59

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

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

265d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7513c529acb322b54c46bef8011275fe734f9d00944c3f3921cebc21c0cd2ed0?d=identicon)[xinningsu](/maintainers/xinningsu)

---

Top Contributors

[![xinningsu](https://avatars.githubusercontent.com/u/7017728?v=4)](https://github.com/xinningsu "xinningsu (3 commits)")

---

Tags

error-monitoringerror-reportingerror-trackingraygunyii2error-reportingerror-monitoringyii2error-trackingraygunraygun4phpraygun yii2 logger

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/xinningsu-yii2-raygun/health.svg)

```
[![Health](https://phpackages.com/badges/xinningsu-yii2-raygun/health.svg)](https://phpackages.com/packages/xinningsu-yii2-raygun)
```

###  Alternatives

[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[bedezign/yii2-audit

Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.

201657.4k4](/packages/bedezign-yii2-audit)[mito/yii2-sentry

Yii 2 extension for Sentry

92377.7k](/packages/mito-yii2-sentry)

PHPackages © 2026

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