2017 © Pedro Peláez
 

symfony-bundle javascript-error-handler-bundle

Converts JavaScript errors to alerts, so you won't miss them if you don't have the browser console open.

image

mhujer/javascript-error-handler-bundle

Converts JavaScript errors to alerts, so you won't miss them if you don't have the browser console open.

  • Thursday, February 8, 2018
  • by mhujer
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,029 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 16 % Grown

The README.md

JavaScriptErrorHandlerBundle

Build Status Coverage Status Latest Stable Version License, (*1)

It is easy to break the JavaScript in the application while doing some non-JS change. And if you don't have the browser console open, you may not notice it., (*2)

This Bundle injects a JavaScript handler, which converts JavaScript errors to alert(). So they can't hide in the console unnoticed., (*3)

Usage

  1. Install the latest version with composer require mhujer/javascript-error-handler-bundle
  2. Register the Bundle in the AppKernel.php:
<?php

class AppKernel extends \Symfony\Component\HttpKernel\Kernel
{

    ...

    public function registerBundles()
    {
        $bundles = [
            ...
            new \Mhujer\JavaScriptErrorHandlerBundle\JavaScriptErrorHandlerBundle(),
        ];

    }

Configuration

The Bundle is automatically enabled only in dev mode (by using kernel.debug configuration parameter)., (*4)

You can configure it manually by adding this to your config.yml:, (*5)

java_script_error_handler:
    enabled: true # or false

Requirements

PHP 8.0+ and Symfony 5.4+., (*6)

Author

Martin Hujer, (*7)

Changelog

1.7 (2021-12-04)

  • require Symfony 5.4+
  • PHP 8.1 support

1.6 (2021-08-01)

  • require PHP 8.0+
  • require Symfony 5.3+

1.5 (2021-02-28)

  • require PHP 7.4+
  • require Symfony 4.4+/5.2+

1.4 (2019-11-24)

  • Symfony 5.0 compatibility

1.3 (2018-11-30)

  • Symfony 4.2 compatibility
  • dropped support for PHP 7.1 as it is no longer supported

1.2 (2018-11-16)

  • PHP 7.3 compatibility

1.1 (2018-02-08)

Fixed support for Symfony 4 and Flex, (*8)

  • #3 Symfony 4 + Flex support

1.0 (2017-10-29)

As we are already using the Bundle at @driveto and with the new Symfony container tests, I'm fine with releasing it as 1.0., (*9)

  • #1 Script should have an ID (thanks @tomasfejfar)
  • #2 Container tests

0.1 (2017-10-23)

  • initial release

The Versions

23/10 2017

0.1

0.1.0.0 https://github.com/mhujer/JavaScriptErrorHandlerBundle

Converts JavaScript errors to alerts, so you won't miss them if you don't have the browser console open.

  Sources   Download

MIT

The Requires

 

The Development Requires

javascript bundle symfony