PHPackages                             niciz/yii2-bugsnag - 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. niciz/yii2-bugsnag

ActiveLibrary

niciz/yii2-bugsnag
==================

Yii2 log target and ErrorHandler for Bugsnag

033PHP

Since Nov 4Pushed 3y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Bugsnag integration
========================

[](#yii2-bugsnag-integration)

To use, configure as such:

```
$config = [
    'components' => [
        'errorHandler' => [
            'class' => 'niciz\yii2bugsnag\BugsnagWebErrorHandler' // For your web configuration
            'class' => 'niciz\yii2bugsnag\BugsnagConsoleErrorHandler' // For your console configuration
        ],
        'bugsnag' => [
            'class' => 'niciz\yii2bugsnag\BugsnagComponent', // Or your override of such
            'bugsnag_api_key' => 'YOUR API KEY',
            'notifyReleaseStages' => ['staging', 'production'],
        ],
        'log' => [
            'traceLevel' => 8,
            'targets' => [
                [
                    'class' => 'niciz\yii2bugsnag\BugsnagLogTarget',
                    'levels' => ['error', 'warning', 'info', 'trace'],
                    'logVars' => [],
                ]
            ],
        ],
    ],
];

```

If you would like to use Bugsnag's javascript on your site, you'll need to install *bower-asset/bugsnag*:

1. Add the following to your project's composer.json

    "repositories": \[ { "type": "composer", "url": "" } \]
2. Require bower-asset/bugsnag

    composer require bower-asset/bugsnag
3. Once you have it installed, simply depend on BugsnagAsset in your AppAsset. This will automatically register Bugsnag's javascript to the page. Default version is 3.

    class AppAsset extends AssetBundle { public $depends = \[ 'niciz\\yii2bugsnag\\assets\\BugsnagAsset', \]; }

If you need to use version 2 of Bugsnag's javascript, you can specify the version in your configuration. See [Customizing Asset Bundles](http://www.yiiframework.com/doc-2.0/guide-structure-assets.html#customizing-asset-bundles).

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/40e2083d35cc21861c842c6d5b399cf5757e1dc775b5d6e3b569202c9116d967?d=identicon)[niciz](/maintainers/niciz)

---

Top Contributors

[![jcherniak](https://avatars.githubusercontent.com/u/1727656?v=4)](https://github.com/jcherniak "jcherniak (11 commits)")[![niciz](https://avatars.githubusercontent.com/u/7879049?v=4)](https://github.com/niciz "niciz (7 commits)")[![ahtinurme](https://avatars.githubusercontent.com/u/282119?v=4)](https://github.com/ahtinurme "ahtinurme (4 commits)")[![JPtaormina](https://avatars.githubusercontent.com/u/39569003?v=4)](https://github.com/JPtaormina "JPtaormina (1 commits)")[![liviuk2](https://avatars.githubusercontent.com/u/11991766?v=4)](https://github.com/liviuk2 "liviuk2 (1 commits)")[![rzumstein](https://avatars.githubusercontent.com/u/7303748?v=4)](https://github.com/rzumstein "rzumstein (1 commits)")[![tonysm](https://avatars.githubusercontent.com/u/1178621?v=4)](https://github.com/tonysm "tonysm (1 commits)")[![antongorodezkiy](https://avatars.githubusercontent.com/u/580599?v=4)](https://github.com/antongorodezkiy "antongorodezkiy (1 commits)")[![diogopms](https://avatars.githubusercontent.com/u/2445019?v=4)](https://github.com/diogopms "diogopms (1 commits)")

### Embed Badge

![Health badge](/badges/niciz-yii2-bugsnag/health.svg)

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

PHPackages © 2026

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