Download the PHP package pinfirestudios/yii2-bugsnag without Composer
On this page you can find all versions of the php package pinfirestudios/yii2-bugsnag. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pinfirestudios/yii2-bugsnag
More information about pinfirestudios/yii2-bugsnag
Files in pinfirestudios/yii2-bugsnag
Package yii2-bugsnag
Short Description Yii2 log target and ErrorHandler for BugSnag
License MIT
Informations about the package yii2-bugsnag
Yii2 Bugsnag integration
To use, configure as such:
$config = [
'components' => [
'errorHandler' => [
'class' => 'pinfirestudios\yii2bugsnag\BugsnagWebErrorHandler' // For your web configuration
'class' => 'pinfirestudios\yii2bugsnag\BugsnagConsoleErrorHandler' // For your console configuration
],
'bugsnag' => [
'class' => 'pinfirestudios\yii2bugsnag\BugsnagComponent', // Or your override of such
'bugsnag_api_key' => 'YOUR API KEY',
'notifyReleaseStages' => ['staging', 'production'],
],
'log' => [
'traceLevel' => 8,
'targets' => [
[
'class' => 'pinfirestudios\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:
-
Add the following to your project's composer.json
"repositories": [ { "type": "composer", "url": "https://asset-packagist.org" } ]
-
Require bower-asset/bugsnag
composer require bower-asset/bugsnag
-
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 = [ '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.