<commit_before># ZF3-Whoops, integrated [whoops](https://github.com/filp/whoops) in Zend Framework 3

-----

![Whoops!](http://i.imgur.com/xiZ1tUU.png)

**whoops** is an error handler base/framework for PHP. Out-of-the-box, it provides a pretty
error interface that helps you debug your web projects, but at heart it's a simple yet
powerful stacked error handling system.

# Table of Contents

* [Module installation](#module-installation)
* [Features](#features)
  * [Render View Manager - Twig Support](#render-view-manager---twig-support)
  * [Module Visibility Manager](#module-visibility-manager)
* [License](#license)



# Module installation
  1. `cd my/project/directory`
  2. create a `composer.json` file with following contents:

     ```json
     {
         "require": {
             "ppito/zf3-whoops": "^1.2"
         }
     }
     ```
  3. install composer via `curl -s http://getcomposer.org/installer | php` (on windows, download
     http://getcomposer.org/installer and execute it with PHP)
  4. run `php composer.phar install`
  5. open `my/project/directory/configs/modules.config.php` and add the following key :

     ```php
     'WhoopsErrorHandler', // must be added as the first module
     ```
  6. optional : copy `config/module.config.php` in `my/project/directory/config/autoload/zf3-whoops.local.php`
  7. optional : edit `my/project/directory/config/autoload/zf3-whoops.local.php`

# Features

### Render View Manager - Twig Support 
###### (zf3-whoops >= 1.2.0)

By default this module use the simple php render, but you can now specify your favorite render.

##### Usage :
`Twig render` has been supported, you just need to change the `template_render` configuration:
```php
'template_render' => 'zf3_whoops/twig_error',
```

# Module Visibility Manager 
###### (zf3-whoops >= 1.3.0)

There is now possible to manage the module loading by implement your own rules.<commit_msg>ZFW-4: update readme<commit_after># ZF3-Whoops, integrated [whoops](https://github.com/filp/whoops) in Zend Framework 3

-----

![Whoops!](http://i.imgur.com/xiZ1tUU.png)

**whoops** is an error handler base/framework for PHP. Out-of-the-box, it provides a pretty
error interface that helps you debug your web projects, but at heart it's a simple yet
powerful stacked error handling system.

# Table of Contents

* [Module installation](#module-installation)
* [Features](#features)
  * [Render View Manager - Twig Support](#render-view-manager---twig-support)
  * [Module Visibility Manager](#module-visibility-manager)
* [License](#license)



# Module installation
  1. `cd my/project/directory`
  2. create a `composer.json` file with following contents:

     ```json
     {
         "require": {
             "ppito/zf3-whoops": "^1.2"
         }
     }
     ```
  3. install composer via `curl -s http://getcomposer.org/installer | php` (on windows, download
     http://getcomposer.org/installer and execute it with PHP)
  4. run `php composer.phar install`
  5. open `my/project/directory/configs/modules.config.php` and add the following key :

     ```php
     'WhoopsErrorHandler', // must be added as the first module
     ```
  6. optional : copy `config/module.config.php` in `my/project/directory/config/autoload/zf3-whoops.local.php`
  7. optional : edit `my/project/directory/config/autoload/zf3-whoops.local.php`

# Features

### Render View Manager - Twig Support 
###### (zf3-whoops >= 1.2.0)

By default this module use the simple php render, but you can now specify your favorite render.

##### Usage :
`Twig render` has been supported, you just need to change the `template_render` configuration:
```php
'template_render' => 'zf3_whoops/twig_error',
```

# Module Visibility Manager 
###### (zf3-whoops >= 1.3.0)

It is now possible to manage the module loading by implement your own rules.
{'fraction_non_alphanumeric': 0.13336820083682008, 'fraction_numerical': 0.012813807531380754, 'mean_word_length': 3.575358851674641, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7671581', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1190, 'n_words': 371}