This component is the way to integrate ratchet.io service with your Yii app.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
RatchetioComponent.php
RatchetioErrorHandler.php

README.md

Ratchetio

Ratchetio Component is the way to integrate ratchet.io service with your Yii application. Ratchet.io aggregates and analyzes your application errors and deploys.

Installation

  1. Download ratchetio.php and put it in the same directory where RatchetioComponent.php and RatchetioErrorHandler.php are. For example, protected/extensions/yiiext/components/RatchetioComponent.

  2. Add ratchetio component to the main.php config:

    // ...
    'components' => array(
        // ...
        'ratchetio'=>array(
            'class' => 'ext.yiiext.components.RatchetioComponent', // adjust path if needed
            'accessToken' => 'your_serverside_ratchetio_token',
        ),
    ),
  3. Adjust main.php config to preload the component:

    'preload'=>array('log', 'ratchetio'),
  4. Set RatchetioErrorHandler as error handler:

    'components' => array(
        // ...
        'errorHandler'=>array(
            'class'=>'ext.yiiext.components.ratchetio.RatchetioErrorHandler',
            // ...
        ),
    ),

    You can also pass some additional ratchet.io options in the component config: environment, branch, maxErrno, baseApiUrl etc.

    A good idea is to specify environment as:

    'environment' => isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'cli_'.php_uname("n"),

    You can specify alias of your project root directory for linking stack traces ('application' by default):

    'rootAlias' => 'root',