From 9eac8153db7c12ea41665e64cf139653d0263a90 Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Sun, 5 Jun 2016 19:45:21 +0100 Subject: [PATCH] Switched error handler to Whoops --- app/Exceptions/Handler.php | 2 +- composer.json | 6 +- composer.lock | 133 ++++++++++++++++++++++++++++++++++++- config/app.php | 1 + 4 files changed, 137 insertions(+), 5 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 7208f57b..d3f61135 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -22,7 +22,7 @@ namespace Poniverse\Ponyfm\Exceptions; use Exception; use Symfony\Component\HttpKernel\Exception\HttpException; -use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use GrahamCampbell\Exceptions\ExceptionHandler as ExceptionHandler; class Handler extends ExceptionHandler { diff --git a/composer.json b/composer.json index 84657bf5..f8fcedae 100644 --- a/composer.json +++ b/composer.json @@ -17,13 +17,15 @@ "cviebrock/laravel-elasticsearch": "^1.0", "barryvdh/laravel-debugbar": "^2.2", "predis/predis": "^1.0", - "ksubileau/color-thief-php": "^1.3" + "ksubileau/color-thief-php": "^1.3", + "graham-campbell/exceptions": "^8.6" }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~4.1", - "phpspec/phpspec": "~2.1" + "phpspec/phpspec": "~2.1", + "filp/whoops": "^2.1" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index e8a4b68f..da69a173 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "56b02faea989ea1477a2e750c8b7364d", - "content-hash": "46f16166f90cd1546772880f9725b112", + "hash": "5c9f86045c835b8964e1eb198a7727ea", + "content-hash": "a09f15b4c222efb8e676a4efdd979b4f", "packages": [ { "name": "barryvdh/laravel-debugbar", @@ -883,6 +883,75 @@ ], "time": "2016-03-18 16:31:37" }, + { + "name": "graham-campbell/exceptions", + "version": "v8.6.1", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Laravel-Exceptions.git", + "reference": "40e6208cff22859cd63788fee19a8c15aebc1ef9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Exceptions/zipball/40e6208cff22859cd63788fee19a8c15aebc1ef9", + "reference": "40e6208cff22859cd63788fee19a8c15aebc1ef9", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*|5.2.*|5.3.*", + "illuminate/support": "5.1.*|5.2.*|5.3.*", + "paragonie/random_compat": "^1.1|^2.0", + "php": ">=5.5.9", + "psr/log": "^1.0", + "symfony/debug": "^2.7|^3.0", + "symfony/http-foundation": "^2.7|^3.0" + }, + "require-dev": { + "filp/whoops": "^1.1|^2.0", + "graham-campbell/testbench": "^3.1", + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.8|^5.0" + }, + "suggest": { + "filp/whoops": "Enables use of the debug displayer." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.6-dev" + } + }, + "autoload": { + "psr-4": { + "GrahamCampbell\\Exceptions\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" + } + ], + "description": "Provides A Powerful Error Response System For Both Development And Production", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Laravel Exceptions", + "Laravel-Exceptions", + "error", + "errors", + "exception", + "exceptions", + "framework", + "laravel", + "whoops" + ], + "time": "2016-06-04 20:20:48" + }, { "name": "guzzlehttp/guzzle", "version": "6.2.0", @@ -3473,6 +3542,66 @@ ], "time": "2015-06-14 21:17:01" }, + { + "name": "filp/whoops", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "d13505b240a6f580bc75ba591da30299d6cb0eec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/d13505b240a6f580bc75ba591da30299d6cb0eec", + "reference": "d13505b240a6f580bc75ba591da30299d6cb0eec", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "^4.8 || ^5.0", + "symfony/var-dumper": "~3.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://github.com/filp/whoops", + "keywords": [ + "error", + "exception", + "handling", + "library", + "whoops", + "zf2" + ], + "time": "2016-04-07 06:16:25" + }, { "name": "fzaninotto/faker", "version": "v1.6.0", diff --git a/config/app.php b/config/app.php index 3f5d52e9..82e265a9 100644 --- a/config/app.php +++ b/config/app.php @@ -150,6 +150,7 @@ return [ Intouch\LaravelNewrelic\NewrelicServiceProvider::class, Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, Cviebrock\LaravelElasticsearch\ServiceProvider::class, + GrahamCampbell\Exceptions\ExceptionsServiceProvider::class, ],