Skip to content
This repository has been archived by the owner on Mar 6, 2021. It is now read-only.

peteraba/FooDebug

Repository files navigation

FooDebug

Library for making multilingual applications in Opulence easy.

Build Status License composer.lock Scrutinizer Code Quality Code Coverage Build Status

Setup

Install the library via composer:

composer install peteraba/foo-debug

Replace your exceptions config file

# config/http/exceptions.php

<?php

use Foo\Debug\Exceptions\Handlers\Whoops\ExceptionHandler;
use Foo\Debug\Exceptions\Handlers\Whoops\ExceptionRenderer;
use Opulence\Environments\Environment;
use Whoops\Run;

/**
 * ----------------------------------------------------------
 * Define the exception handler
 * ----------------------------------------------------------
 *
 * The last parameter lists any exceptions you do not want to log
 */
$isDevelopment = Environment::getVar('ENV_NAME') === Environment::DEVELOPMENT;

$exceptionRenderer = new ExceptionRenderer(new Run(), $isDevelopment);

return new ExceptionHandler(
    $logger,
    $exceptionRenderer,
    [
        HttpException::class
    ]
);

About

Whoops Handler for Opulence

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages