peteraba / foo-debug
This package is abandoned and no longer maintained.
No replacement package was suggested.
Whoops Handler for Opulence
dev-master
2017-04-20 00:41 UTC
Requires
- filp/whoops: ^2.1
- opulence/opulence: ^1.0
Requires (Dev)
- phpunit/phpunit: ^6.1
This package is auto-updated.
Last update: 2021-03-09 14:35:36 UTC
README
Library for making multilingual applications in Opulence easy.
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 ] );