Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit 5b0b9ea

Browse files
authored
Merge pull request #17 from lucid-architecture/7.0
upgrade to Laravel v7
2 parents feb1e93 + e5227fb commit 5b0b9ea

26 files changed

+1941
-1168
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ REDIS_HOST=127.0.0.1
2222
REDIS_PASSWORD=null
2323
REDIS_PORT=6379
2424

25-
MAIL_DRIVER=smtp
25+
MAIL_MAILER=smtp
2626
MAIL_HOST=mailtrap.io
2727
MAIL_PORT=2525
2828
MAIL_USERNAME=null

app/Exceptions/Handler.php

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
namespace App\Exceptions;
44

5-
use Exception;
6-
use Illuminate\Auth\AuthenticationException;
5+
use Throwable;
76
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
87

98
class Handler extends ExceptionHandler
@@ -14,23 +13,17 @@ class Handler extends ExceptionHandler
1413
* @var array
1514
*/
1615
protected $dontReport = [
17-
\Illuminate\Auth\AuthenticationException::class,
18-
\Illuminate\Auth\Access\AuthorizationException::class,
19-
\Symfony\Component\HttpKernel\Exception\HttpException::class,
20-
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
21-
\Illuminate\Session\TokenMismatchException::class,
22-
\Illuminate\Validation\ValidationException::class,
2316
];
2417

2518
/**
2619
* Report or log an exception.
2720
*
28-
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
29-
*
30-
* @param \Exception $exception
21+
* @param \Throwable $exception
3122
* @return void
23+
*
24+
* @throws \Throwable
3225
*/
33-
public function report(Exception $exception)
26+
public function report(Throwable $exception)
3427
{
3528
parent::report($exception);
3629
}
@@ -39,27 +32,13 @@ public function report(Exception $exception)
3932
* Render an exception into an HTTP response.
4033
*
4134
* @param \Illuminate\Http\Request $request
42-
* @param \Exception $exception
43-
* @return \Illuminate\Http\Response
44-
*/
45-
public function render($request, Exception $exception)
46-
{
47-
return parent::render($request, $exception);
48-
}
49-
50-
/**
51-
* Convert an authentication exception into an unauthenticated response.
35+
* @param \Throwable $exception
36+
* @return \Symfony\Component\HttpFoundation\Response
5237
*
53-
* @param \Illuminate\Http\Request $request
54-
* @param \Illuminate\Auth\AuthenticationException $exception
55-
* @return \Illuminate\Http\Response
38+
* @throws \Throwable
5639
*/
57-
protected function unauthenticated($request, AuthenticationException $exception)
40+
public function render($request, Throwable $exception)
5841
{
59-
if ($request->expectsJson()) {
60-
return response()->json(['error' => 'Unauthenticated.'], 401);
61-
}
62-
63-
return redirect()->guest('login');
42+
return parent::render($request, $exception);
6443
}
6544
}

app/Http/Controllers/Auth/ForgotPasswordController.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/Http/Controllers/Auth/LoginController.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 0 additions & 72 deletions
This file was deleted.

app/Http/Controllers/Auth/ResetPasswordController.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/Http/Controllers/Auth/VerificationController.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

app/Http/Kernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Kernel extends HttpKernel
1515
*/
1616
protected $middleware = [
1717
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18+
\Fruitcake\Cors\HandleCors::class,
1819
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
1920
\App\Http\Middleware\TrimStrings::class,
2021
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,

app/Http/Middleware/VerifyCsrfToken.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66

77
class VerifyCsrfToken extends BaseVerifier
88
{
9-
/**
10-
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
11-
*
12-
* @var bool
13-
*/
14-
protected $addHttpCookie = true;
15-
169
/**
1710
* The URIs that should be excluded from CSRF verification.
1811
*

composer.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@
55
"license": "MIT",
66
"type": "project",
77
"require": {
8-
"php": "^7.2",
9-
"laravel/framework": "^6.18.35",
10-
"lucid-arch/laravel-foundation": "^6.0",
11-
"laravel/helpers": "^1.1",
8+
"php": "^7.3",
9+
"fideloper/proxy": "^4.2",
10+
"fruitcake/laravel-cors": "^1.0",
11+
"guzzlehttp/guzzle": "^6.3",
12+
"laravel/framework": "^7.0",
1213
"laravel/tinker": "^2.0",
13-
"fideloper/proxy": "~4.0"
14+
"lucid-arch/laravel-foundation": "^7.0"
1415
},
1516
"require-dev": {
17+
"facade/ignition": "^2.0",
1618
"fzaninotto/faker": "^1.9.1",
17-
"mockery/mockery": "^1.0",
18-
"facade/ignition": "^1.4",
19-
"nunomaduro/collision": "^3.0",
20-
"phpunit/phpunit": "^8.0",
21-
"symfony/css-selector": "~4.0",
22-
"symfony/dom-crawler": "~4.0",
23-
"lucid-arch/laravel-console": "^6.0"
19+
"mockery/mockery": "^1.3.1",
20+
"nunomaduro/collision": "^4.1",
21+
"phpunit/phpunit": "^9.0",
22+
"lucid-arch/laravel-console": "^7.0"
2423
},
2524
"autoload": {
2625
"classmap": [

0 commit comments

Comments
 (0)