Skip to content

After a simple setup this module will allow you to get notifications by email about occured errors in JavaScript. This bundle can be used as an independent module or together with BadaBoom bundle.

License

Notifications You must be signed in to change notification settings

formapro/JsErrorNotifierBundle

Repository files navigation

Getting Started With FpJsErrorNotifierBundle

After a simple setup this module will allow you to get notifications by email about occured errors in Javasccript. This bundle can be used as an independent module or together with BadaBoom bundle.

Installation

Step 1: Download FpJsErrorNotifierBundle using composer

Add FOSUserBundle in your composer.json:

{
    "require": {
        "fp/jserrornotifier-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update fp/jserrornotifier-bundle

Composer will install the bundle to your vendors

Step 2: Enable the Bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Fp\JsErrorNotifierBundle\FpJsErrorNotifierBundle(),
    );
}

Step 3: Configure your application's security.yml

# app/config/security.yml
security:
    access_control:
        - { path: ^/fp_js_error_notifier, role: IS_AUTHENTICATED_ANONYMOUSLY }

Step 4: Import FpJsErrorNotifierBundle routing

# app/config/routing.yml

fp_js_error_notifier:
    resource: "@FpJsErrorNotifierBundle/Resources/config/routing.xml"

Step 5. Add Javascript to your layout

{% javascripts '@FpJsErrorNotifierBundle/Resources/public/js/jsErrorNotifier.js' %}
    <script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}

Step 6: Configure the FpJsErrorNotifierBundle

If you have an enabled and configured BadaBoom bundle, you can skip this step. Otherwise you have to add some configurations for this bundle:

# app/config/config.yml
fp_js_error_notifier:
    email_from: 'noreply@test.com' # sender email
    email_to: ['john@example.com'] # list of recipients notification

About

After a simple setup this module will allow you to get notifications by email about occured errors in JavaScript. This bundle can be used as an independent module or together with BadaBoom bundle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published