11# yii2-airbrake
2+
23Airbrake integration for Yii2, which wraps around official
34[ Airbrake PHP library (airbrake/phpbrake)] ( https://github.com/airbrake/phpbrake ) .
45
56## Installation
7+
68 composer require biller/yii2-airbrake
79
810## Usage
11+
912While it is not explicitly required, it is recommended to configure the ` AirbrakeService `
10- as a component in environment (or even common) configuration, so it is easily accessible
11- from the whole application ( using i.e. ` Yii::$app->get('airbrakeService') ` ).
13+ as a component in environment (or even common) configuration, so it is easily accessible from the whole application (
14+ using i.e. ` Yii::$app->get('airbrakeService') ` ).
1215
1316``` php
1417return [
@@ -43,6 +46,7 @@ return [
4346 ],
4447];
4548```
49+
4650* Configuration options marked with asterisk are required, all other options are optional.*
4751
4852* ` rootDirectory ` : should be set to your sources root to allow shortening of file paths
@@ -57,19 +61,21 @@ return [
5761* For additional information about the API, please consult official Airbrake PHP library documentation.*
5862
5963### AirbrakeFilterFactory
64+
6065Factory class that can be used to create various filtering rules.
6166
6267#### ` AirbrakeFilterFactory::createParamsFilter(array $params, $replacement = 'FILTERED') `
68+
6369Method will create filtering callable that filters parameters, specified by
64- ` $params ` and replaces it with specified ` $replacement ` . Example usage is
65- available above.
70+ ` $params ` and replaces it with specified ` $replacement ` . Example usage is available above.
6671
6772## Console Support
68- Integration can be added to Yii console, where it currently provides a command
69- to track deployment (new feature in Airbrake API 4 that allows to mark error
70- timeline with deployments).
73+
74+ Integration can be added to Yii console, where it currently provides a command to track deployment (new feature in
75+ Airbrake API 4 that allows to mark error timeline with deployments).
7176
7277### Usage
78+
7379To use ` ConsoleController ` , ` AirbrakeService ` should be configured as component.
7480
7581 import enscope\Yii2\Ext\Airbrake\ConsoleController;
@@ -85,8 +91,8 @@ To use `ConsoleController`, `AirbrakeService` should be configured as component.
8591 ],
8692 ];
8793
88- While parameters can be hard-coded in configuration, console controller
89- supports ` inferParameters ` , ` username ` , ` revision ` and ` repository `
94+ While parameters can be hard-coded in configuration, console controller supports ` inferParameters ` , ` username `
95+ , ` revision ` and ` repository `
9096parameters to be set by arguments on command line.
9197
9298* ` airbrakeService ` : name of the component or initialized instance
@@ -96,10 +102,13 @@ parameters to be set by arguments on command line.
96102* ` username ` : name of the user tracking deploy (default "system")
97103
98104## Logging Target
105+
99106You can configure Yii2 logger to log errors automatically to Airbrake Service.
100107
101108### Usage
109+
102110To use ` ConsoleController ` , ` AirbrakeService ` should be configured as component.
111+
103112``` php
104113return [
105114 'components' => [
@@ -114,10 +123,14 @@ return [
114123 ],
115124];
116125```
117- The target currently does not expose any other configuration options
118- other then those exposed by ` yii\log\Target ` , except the service component:
126+
127+ The target currently does not expose any other configuration options other then those exposed by ` yii\log\Target ` ,
128+ except the service component:
129+
119130* ` airbrakeService ` : name of the component or initialized instance
120131
121132## License
122- Yii2 Airbrake integration is licensed under [ The MIT License (MIT)] ( https://github.com/enscope/yii2-airbrake/blob/master/LICENSE )
133+
134+ Yii2 Airbrake integration is licensed
135+ under [ The MIT License (MIT)] ( https://github.com/biller/yii2-airbrake/blob/master/LICENSE )
123136as is the original PHP Airbrake library and follows the versioning of that library.
0 commit comments