PHPackages                             violet88/bugsnag-silverstripe-vue - 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. violet88/bugsnag-silverstripe-vue

ActiveSilverstripe-vendormodule

violet88/bugsnag-silverstripe-vue
=================================

A module to use Bugsnag in SilverStripe projects together with Bugsnag for Vue.

v2.0.1(1y ago)0138[6 PRs](https://github.com/Violet88github/silverstripe-bugsnag-module-vue/pulls)BSD-3-ClausePHPPHP ^7.4 || ^8.0

Since Oct 6Pushed 1y agoCompare

[ Source](https://github.com/Violet88github/silverstripe-bugsnag-module-vue)[ Packagist](https://packagist.org/packages/violet88/bugsnag-silverstripe-vue)[ RSS](/packages/violet88-bugsnag-silverstripe-vue/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (12)Used By (0)

Bugsnag module for Silverstripe
===============================

[](#bugsnag-module-for-silverstripe)

[![CI](https://github.com/Violet88github/silverstripe-bugsnag-module-vue/actions/workflows/cicd.yml/badge.svg)](https://github.com/Violet88github/silverstripe-bugsnag-module-vue/actions/workflows/cicd.yml)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/bd215a0c44f0404642a529c59d1b85e6bd862ac6314aeb2a6296e25efa9e7c4c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f56696f6c657438386769746875622f73696c7665727374726970652d627567736e61672d6d6f64756c652d7675652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Violet88github/silverstripe-bugsnag-module-vue/?branch=master)[![Build Status](https://camo.githubusercontent.com/059e0180c52769ee364b24c0f464ba5301bdbccdf5cfe873915ad7a3c218cba5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f56696f6c657438386769746875622f73696c7665727374726970652d627567736e61672d6d6f64756c652d7675652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Violet88github/silverstripe-bugsnag-module-vue/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/8fef4a0f3b38722336bb9013c4fe0e933c35e84cdd441a4b364810d649df490e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f56696f6c657438386769746875622f73696c7665727374726970652d627567736e61672d6d6f64756c652d7675652f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)

Requirements
------------

[](#requirements)

- SilverStripe ^4.0
- [silverstripe/framework](https://packagist.org/packages/silverstripe/framework)
- [bugsnag/bugsnag](https://packagist.org/packages/bugsnag/bugsnag)
- [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle)
- [silverstripe/admin](https://packagist.org/packages/silverstripe/admin)

Dev requirements
----------------

[](#dev-requirements)

- [phpunit/phpunit](https://packagist.org/packages/phpunit/phpunit)
- [squizlabs/php\_codesniffer](https://packagist.org/packages/squizlabs/php_codesniffer)

NPM Requirements
----------------

[](#npm-requirements)

- [webpack](https://www.npmjs.com/package/webpack)
- [dotenv](https://www.npmjs.com/package/dotenv)
- [webpack-bugsnag-plugins](https://www.npmjs.com/package/webpack-bugsnag-plugins)

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

[](#installation)

To install, first add the following to your composer.json

```
"repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ],
```

after that run the following command

```
composer require violet88/bugsnag-silverstripe-vue
```

After installing the composer package, it is important to install the node dependencies of the module. To make this easier add the following to your composer.json

```
"scripts": {
        "install-bugsnag-packages": [
            "cd vendor/violet88/bugsnag-silverstripe-vue && npm install"
        ]
    }
```

And run the command:

```
composer install-bugsnag-packages
```

License
-------

[](#license)

See [License](license.md)

Documentation
-------------

[](#documentation)

- [Documentation readme](docs/en/readme.md)

Configuration
-------------

[](#configuration)

For base use, add the following to your .env file

**When running local, to prevent Bugsnag from being filled with errors, set BUGSNAG\_ACTIVE to false OR do not declare it. (If not declared messages will also not be sent to Bugsnag.**

```
BUGSNAG_API_KEY=
BUGSNAG_STANDARD_SEVERITY=
BUGSNAG_ACTIVE=
```

For using the BugsnagLogger as the standard error logger, add the following to your configuration yaml

```
SilverStripe\Core\Injector\Injector:
  Psr\Log\LoggerInterface:
    calls:
      BugsnagHandler: [pushHandler, ['%$BugsnagHandler']]
  BugsnagHandler:
    class: Violet88\BugsnagModule\BugsnagLogger
    constructor:
      - '%$Violet88\BugsnagModule\Bugsnag'
```

For using the CLI command to sent your current release revision to Bugsnag, add the following to your routes yaml

```
SilverStripe\Control\Director:
    rules:
        'bugsnag//build': 'Violet88\BugsnagModule\BugsnagController'
        'bugsnag//initial': 'Violet88\BugsnagModule\BugsnagController'
```

For the Vue part of the module to work you have to run:

```
npm install dotenv webpack webpack-bugsnag-plugins
```

and add the following to your webpack.mix.js

```
require('dotenv').config();
let webpack = require('webpack');
const { BugsnagSourceMapUploaderPlugin } = require('webpack-bugsnag-plugins');
const PACKAGE_VERSION = process.env.npm_package_version

let dotenvplugin = new webpack.DefinePlugin({
    'process.env': {
        'BUGSNAG_API_KEY': JSON.stringify(process.env.BUGSNAG_API_KEY),
        'BUGSNAG_ACTIVE': JSON.stringify(process.env.BUGSNAG_ACTIVE),
        'VERSION': JSON.stringify(PACKAGE_VERSION)
    }
});
mix.options({legacyNodePolyfills: false})
mix.webpackConfig({
    output: {
        library: 'BugsnagVue',
        libraryTarget: 'umd',
        umdNamedDefine: true,
        globalObject: 'this'
    },
    plugins: [
        dotenvplugin,
        new BugsnagSourceMapUploaderPlugin({
            apiKey: process.env.BUGSNAG_API_KEY,
            appVersion: PACKAGE_VERSION ?? '1.0.0',
            overwrite: true,
            publicPath: '*'
        })
    ]
});
```

Also make sure you generate the sourcemaps, for example by adding `.sourceMaps(true, 'source-map')` between mix.js()). This could look as follows:

```
mix.sourceMaps(true, 'source-map').js([
    `${theme}/javascript/bundle.js`,
    //'vendor/violet88/silverstripe-bugsnag-module-vue/src/js/BugsnagVue.js'
    ], `${theme}/dist/js/bundle.js`);
```

After that add the following to your root composer.json

```
"scripts": {
        "install-bugsnag-packages": "cd vendor/violet88/bugsnag-silverstripe-vue && npm install"
    }
```

and run the following command

```
composer run-script install-bugsnag-packages
```

Basic usage
-----------

[](#basic-usage)

### PHP

[](#php)

For sending a basic error to Bugsnag, use the following code

```
use Violet88\BugsnagModule\Bugsnag;
use Exception;
use SilverStripe\Core\Injector\Injector;

try{
    //do something
} catch (Exception $e) {
    $bugsnag = Injector::inst()->get(Bugsnag::class);
    $bugsnag->sendException($e);
}
```

### Javascript

[](#javascript)

For sending a basic error to Bugsnag, use the following code

```
// Here it is important that the require is pointing to the correct path. Point it to the path where you've installed the composer package.
const Bugsnag = require('/vendor/Violet88/BugsnagVueModule/src/js/BugsnagVue.js');

Bugsnag.start();
try{
    something.risky();
}catch(e){
    Bugsnag.notify(e);
}
```

Maintainers
-----------

[](#maintainers)

- Sven van der Zwet

Bugtracker
----------

[](#bugtracker)

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

- Create a new issue
- Choose the issue template for 'Bugs'
- Follow the instructions in the template

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

Development and contribution
----------------------------

[](#development-and-contribution)

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

Feel free to join the community on slack: [Join Slack](https://join.slack.com/t/silverstripe-bugsnag/shared_invite/zt-1gprtht4j-RIY_QyhTTxJZliDRlBAS~Q)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.8% 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 ~250 days

Total

4

Last Release

564d ago

Major Versions

v1.0.1 → v2.0.02024-10-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/2776eb19c4ec68ca7f7e0c587150379b72cdd2474703fe70dfb5b84c89b41c46?d=identicon)[JanSneeuw](/maintainers/JanSneeuw)

---

Top Contributors

[![JanSneeuw](https://avatars.githubusercontent.com/u/48092471?v=4)](https://github.com/JanSneeuw "JanSneeuw (132 commits)")[![Svenodoculos](https://avatars.githubusercontent.com/u/10992746?v=4)](https://github.com/Svenodoculos "Svenodoculos (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

silverstripebugsnagcmsViolet88

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/violet88-bugsnag-silverstripe-vue/health.svg)

```
[![Health](https://phpackages.com/badges/violet88-bugsnag-silverstripe-vue/health.svg)](https://phpackages.com/packages/violet88-bugsnag-silverstripe-vue)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)

PHPackages © 2026

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