2017 © Pedro Peláez
 

craft-plugin craft3-bugsnag

Enables errors to be sent to Bugsnag (www.bugsnag.com)

image

pinfirestudios/craft3-bugsnag

Enables errors to be sent to Bugsnag (www.bugsnag.com)

  • Friday, February 23, 2018
  • by pinfirestudios
  • Repository
  • 1 Watchers
  • 2 Stars
  • 442 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 64 % Grown

The README.md

Bugsnag plugin for Craft CMS 3.x

Enables errors to be sent to Bugsnag, (*1)

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later., (*2)

Installation

To install the plugin, follow these instructions., (*3)

  1. Open your terminal and go to your Craft project:, (*4)

    cd /path/to/project, (*5)

  2. Then tell Composer to load the plugin:, (*6)

    composer require pinfirestudios/craft3-bugsnag, (*7)

  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for craft3-bugsnag., (*8)

  4. If you want to be able to capture early initialization errors, you need to add this plugin to your project's bootstrap configuration. To do this, in config/app.php, add:, (*9)

    'bootstrap' => [
        '\pinfirestudios\craft3bugsnag\Bootstrap'
    ]
    

This will load the Bugsnag component and logging portion early in the project initialization, giving you the greatest visibility into errors. If you don't enable this, Bugsnag will be initialized when plugins are set up, later in the loading process., (*10)

Configuring craft3-bugsnag

You will need to provide your API key and optionally the release stage via the settings page or via config/env files. The recommended way however is to copy src/config.php to /APP_ROOT/config/craft3-bugsnag.php, then either edit it directly, or add BUGSNAG_API_KEY to your .env file. For the release stage, if not set directly, it will default to the CRAFT_ENVIRONMENT variable., (*11)

Using craft3-bugsnag

If things crash and this is enabled, visit your Bugsnag dashboard to see why., (*12)

Getting JavaScript errors

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

  1. Add the following to your project's composer.json, (*14)

    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ]
    
  2. Require bower-asset/bugsnag, (*15)

    composer require bower-asset/bugsnag, (*16)

  3. Once you have it installed, add BugsnagAsset to your TWIG file (or controller if working inside a plugin), (*17)

In TWIG:, (*18)

{% do view.registerAssetBundle("\\pinfirestudios\\yii2bugsnag\\BugsnagAsset") %}

In a plugin asset:, (*19)

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

If you need to use version 2 of Bugsnag's JavaScript, you can specify the version in your configuration. See Customizing Asset Bundles., (*20)

The Versions

23/02 2018

dev-master

9999999-dev

Enables errors to be sent to Bugsnag (www.bugsnag.com)

  Sources   Download

MIT

The Requires

 

cms craftcms craft-plugin craft craft3-bugsnag

07/11 2017

1.0.0-beta.4

1.0.0.0-beta4

Enables errors to be sent to Bugsnag (www.bugsnag.com)

  Sources   Download

MIT

The Requires

 

cms craftcms craft-plugin craft craft3-bugsnag

03/11 2017

1.0.0-beta.3

1.0.0.0-beta3

Enables errors to be sent to Bugsnag (www.bugsnag.com)

  Sources   Download

MIT

The Requires

 

cms craftcms craft-plugin craft craft3-bugsnag

02/11 2017

1.0.0-beta.2

1.0.0.0-beta2

Enables errors to be sent to Bugsnag (www.bugsnag.com)

  Sources   Download

MIT

The Requires

 

cms craftcms craft-plugin craft craft3-bugsnag

31/10 2017

1.0.0-beta.1

1.0.0.0-beta1

Enables errors to be sent to Bugsnag (www.bugsnag.com)

  Sources   Download

MIT

The Requires

 

cms craftcms craft-plugin craft craft3-bugsnag