From e4f7923a54bdbb02830f1b5d0973f00b6678f300 Mon Sep 17 00:00:00 2001 From: Gijs Jorissen Date: Wed, 18 Jan 2017 20:05:53 +0100 Subject: [PATCH 1/2] Rename Http/Exception to Http/Exceptions --- src/Illuminate/Foundation/Exceptions/Handler.php | 2 +- .../Foundation/Http/Middleware/ValidatePostSize.php | 4 ++-- .../Http/{Exception => Exceptions}/HttpResponseException.php | 2 +- .../Http/{Exception => Exceptions}/PostTooLargeException.php | 2 +- src/Illuminate/Http/ResponseTrait.php | 4 ++-- src/Illuminate/Routing/Route.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename src/Illuminate/Http/{Exception => Exceptions}/HttpResponseException.php (95%) rename src/Illuminate/Http/{Exception => Exceptions}/PostTooLargeException.php (68%) diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php index 340468fe6a30..da6011c0359a 100644 --- a/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/src/Illuminate/Foundation/Exceptions/Handler.php @@ -10,7 +10,7 @@ use Illuminate\Contracts\Container\Container; use Illuminate\Validation\ValidationException; use Illuminate\Auth\Access\AuthorizationException; -use Illuminate\Http\Exception\HttpResponseException; +use Illuminate\Http\Exceptions\HttpResponseException; use Symfony\Component\Debug\Exception\FlattenException; use Illuminate\Database\Eloquent\ModelNotFoundException; use Symfony\Component\HttpKernel\Exception\HttpException; diff --git a/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php b/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php index 4bdeedb3d3bc..475bfac00415 100644 --- a/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php +++ b/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php @@ -3,7 +3,7 @@ namespace Illuminate\Foundation\Http\Middleware; use Closure; -use Illuminate\Http\Exception\PostTooLargeException; +use Illuminate\Http\Exceptions\PostTooLargeException; class ValidatePostSize { @@ -14,7 +14,7 @@ class ValidatePostSize * @param \Closure $next * @return mixed * - * @throws \Illuminate\Http\Exception\PostTooLargeException + * @throws \Illuminate\Http\Exceptions\PostTooLargeException */ public function handle($request, Closure $next) { diff --git a/src/Illuminate/Http/Exception/HttpResponseException.php b/src/Illuminate/Http/Exceptions/HttpResponseException.php similarity index 95% rename from src/Illuminate/Http/Exception/HttpResponseException.php rename to src/Illuminate/Http/Exceptions/HttpResponseException.php index 0dcf48aea864..b27052f02c15 100644 --- a/src/Illuminate/Http/Exception/HttpResponseException.php +++ b/src/Illuminate/Http/Exceptions/HttpResponseException.php @@ -1,6 +1,6 @@ Date: Wed, 18 Jan 2017 20:14:31 +0100 Subject: [PATCH 2/2] Fix test --- tests/Routing/RoutingRouteTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Routing/RoutingRouteTest.php b/tests/Routing/RoutingRouteTest.php index cb657e6ea578..80c5db8a9489 100644 --- a/tests/Routing/RoutingRouteTest.php +++ b/tests/Routing/RoutingRouteTest.php @@ -32,7 +32,7 @@ public function testBasicDispatchingOfRoutes() $router = $this->getRouter(); $router->get('foo/bar', function () { - throw new \Illuminate\Http\Exception\HttpResponseException(new Response('hello')); + throw new \Illuminate\Http\Exceptions\HttpResponseException(new Response('hello')); }); $this->assertEquals('hello', $router->dispatch(Request::create('foo/bar', 'GET'))->getContent());