Skip to content

Releases: baibaratsky/yii2-rollbar

1.6.1 (don’t use this one)

12 Feb 14:14
1e1be75
Compare
Choose a tag to compare
Pre-release

Rollbar updated

This release causes an error. See #10.

1.6.0

21 Jan 09:55
Compare
Choose a tag to compare

Rollbar 1.1 support

1.5.0

28 Dec 10:53
Compare
Choose a tag to compare

enable_utf8_sanitization option support (#6)

1.4.5

30 Oct 14:21
Compare
Choose a tag to compare

Error catching in PHP 7 fixed (issue #5)

1.4.4

27 May 13:39
Compare
Choose a tag to compare
v1.4.4

rollbar/rollbar updated

1.4.3

29 Apr 13:24
Compare
Choose a tag to compare
v1.4.3

rollbar/rollbar updated

1.4.2

26 Apr 14:46
Compare
Choose a tag to compare
v1.4.2

rollbar/rollbar updated

1.4.1

12 Apr 14:25
Compare
Choose a tag to compare

Now you can just log an exception without exiting from program.
Example:

try {
    somethingWrong();
} catch (\Exception $exception) {
    Yii::$app->errorHandler->logException($exception);

1.4.0

10 Mar 18:14
Compare
Choose a tag to compare

Payload from exceptions

If you want your exceptions to send some additional data to Rollbar,
it is possible by implementing the WithPayload interface.

 use baibaratsky\yii\rollbar\WithPayload;

 class SomeException extends \Exception implements WithPayload
 {
     public function rollbarPayload()
     {
         return ['foo' => 'bar'];
     }
 }

1.3.0

05 Feb 10:42
Compare
Choose a tag to compare

You can include additional data in a payload. Put payloadDataCallback in your errorHandler config. For example:

'components' => [
   'errorHandler' => [
       'class' => 'baibaratsky\yii\rollbar\web\ErrorHandler',
       'payloadDataCallback' => function (\baibaratsky\yii\rollbar\web\ErrorHandler $errorHandler) {
           return [
               'exceptionCode' => $errorHandler->exception->getCode(),
               'rawRequestBody' => Yii::$app->request->getRawBody(),
           ];
       },
   ],
],