ErrorHandler for CakePHP3
PHP
Clone or download
kozo Merge pull request #10 from fusic/var_dumper
update var-dumper version.
Latest commit e6c2c79 May 21, 2018
Permalink
Failed to load latest commit information.
src
.editorconfig add .editorconfig Mar 12, 2016
.gitignore add .gitignore Mar 12, 2016
.scrutinizer.yml add .scrutinizer.yml Mar 12, 2016
README.md Update README.md Apr 21, 2017
composer.json
phpunit.xml.dist first commit Mar 12, 2016

README.md

Encount plugin for CakePHP

Code Quality

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require fusic/encount

Usage

// config/bootstrap.php
<?php

// web
use Encount\Error\EncountErrorHandler;
(new EncountErrorHandler(Configure::read('Error')))->register();

// shell
use Encount\Console\EncountConsoleErrorHandler;
(new EncountConsoleErrorHandler(Configure::read('Error')))->register();
// 3.4.0 or higher
// src/Application.php
<?php

use Encount\Middleware\EncountErrorHandlerMiddleware;

$middleware
    //->add(new ErrorHandlerMiddleware(Configure::read('Error.exceptionRenderer')))
    ->add(new EncountErrorHandlerMiddleware(Configure::read('Error.exceptionRenderer')))

Config

// config/app.php
<?php

return [

-snip-

    'Error' => [
        'errorLevel' => E_ALL & ~E_DEPRECATED,
        'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
        'skipLog' => [],
        'log' => true,
        'trace' => true,
        // Encount config
        'encount' => [
            'force' => false,
            'sender' => ['Encount.Mail'],
            'mail' => [
                'prefix' => '',
                'html' => true
            ]
        ],
    ],

-snip-

    'Email' => [
        'default' => [
            'transport' => 'default',
            'from' => 'you@localhost',
            //'charset' => 'utf-8',
            //'headerCharset' => 'utf-8',
        ],
        // Encount Email config
        'error' => [
            'transport' => 'default',
            'from' => 'from@example.com',
            'to' => 'to@example.com'
        ]
    ],

-snip-

];

Sender

Encount.Mail

Encount sender for faultline