Skip to content

Commit 6eb3e7f

Browse files
committed
Merge branch 'shift-24472'
2 parents 7c76f24 + b745f47 commit 6eb3e7f

File tree

26 files changed

+1254
-591
lines changed

26 files changed

+1254
-591
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
APP_NAME="Laravel.io"
12
APP_ENV=local
23
APP_KEY=
34
APP_DEBUG=true
@@ -12,6 +13,7 @@ MAIL_HOST=smtp.mailtrap.io
1213
MAIL_PORT=2525
1314
MAIL_USERNAME=null
1415
MAIL_PASSWORD=null
16+
MAIL_FROM_NAME="${APP_NAME}"
1517

1618
GITHUB_ID=
1719
GITHUB_SECRET=

app/Exceptions/Handler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace App\Exceptions;
44

5-
use Exception;
65
use Illuminate\Auth\Access\AuthorizationException;
76
use Illuminate\Auth\AuthenticationException;
87
use Illuminate\Database\Eloquent\ModelNotFoundException;
98
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
109
use Illuminate\Session\TokenMismatchException;
1110
use Illuminate\Validation\ValidationException;
1211
use Symfony\Component\HttpKernel\Exception\HttpException;
12+
use Throwable;
1313

1414
class Handler extends ExceptionHandler
1515
{
@@ -42,7 +42,7 @@ class Handler extends ExceptionHandler
4242
*
4343
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
4444
*/
45-
public function report(Exception $exception)
45+
public function report(Throwable $exception)
4646
{
4747
parent::report($exception);
4848
}
@@ -51,9 +51,9 @@ public function report(Exception $exception)
5151
* Render an exception into an HTTP response.
5252
*
5353
* @param \Illuminate\Http\Request $request
54-
* @return \Illuminate\Http\Response
54+
* @return \Symfony\Component\HttpFoundation\Response
5555
*/
56-
public function render($request, Exception $exception)
56+
public function render($request, Throwable $exception)
5757
{
5858
return parent::render($request, $exception);
5959
}

app/Helpers/HasLikes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ protected static function bootHasLikes()
1717

1818
public function likedBy(User $user)
1919
{
20-
$this->likes()->create(['user_id' => $user->id]);
20+
$this->likes()->create(['user_id' => $user->id()]);
2121
}
2222

2323
public function dislikedBy(User $user)
2424
{
25-
optional($this->likes()->where('user_id', $user->id)->first())->delete();
25+
optional($this->likes()->where('user_id', $user->id())->first())->delete();
2626
}
2727

2828
public function likes(): MorphMany
@@ -32,7 +32,7 @@ public function likes(): MorphMany
3232

3333
public function isLikedBy(User $user): bool
3434
{
35-
return $this->likes()->where('user_id', $user->id)->exists();
35+
return $this->likes()->where('user_id', $user->id())->exists();
3636
}
3737

3838
public function likesCount(): int

app/Http/Controllers/Auth/EmailConfirmationController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use App\Jobs\ConfirmUser;
77
use App\Jobs\SendEmailConfirmation;
88
use App\User;
9-
use Auth;
109
use Illuminate\Auth\Middleware\Authenticate;
10+
use Illuminate\Support\Facades\Auth;
1111

1212
class EmailConfirmationController extends Controller
1313
{

app/Http/Kernel.php

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ class Kernel extends HttpKernel
1414
* @var array
1515
*/
1616
protected $middleware = [
17+
\App\Http\Middleware\TrustProxies::class,
18+
\Fruitcake\Cors\HandleCors::class,
1719
\App\Http\Middleware\CheckForMaintenanceMode::class,
1820
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
1921
\App\Http\Middleware\TrimStrings::class,
2022
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
21-
\App\Http\Middleware\TrustProxies::class,
2223
];
2324

2425
/**
@@ -40,7 +41,7 @@ class Kernel extends HttpKernel
4041

4142
'api' => [
4243
'throttle:60,1',
43-
'bindings',
44+
\Illuminate\Routing\Middleware\SubstituteBindings::class,
4445
],
4546
];
4647

@@ -58,25 +59,9 @@ class Kernel extends HttpKernel
5859
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
5960
'can' => \Illuminate\Auth\Middleware\Authorize::class,
6061
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
62+
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
6163
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
6264
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
6365
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
6466
];
65-
66-
/**
67-
* The priority-sorted list of middleware.
68-
*
69-
* This forces the listed middleware to always be in the given order.
70-
*
71-
* @var array
72-
*/
73-
protected $middlewarePriority = [
74-
\Illuminate\Session\Middleware\StartSession::class,
75-
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
76-
\App\Http\Middleware\Authenticate::class,
77-
\Illuminate\Routing\Middleware\ThrottleRequests::class,
78-
\Illuminate\Session\Middleware\AuthenticateSession::class,
79-
\Illuminate\Routing\Middleware\SubstituteBindings::class,
80-
\Illuminate\Auth\Middleware\Authorize::class,
81-
];
8267
}

app/Http/Livewire/Notifications.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
final class Notifications extends Component
1414
{
15-
use WithPagination, AuthorizesRequests;
15+
use AuthorizesRequests;
16+
use WithPagination;
1617

1718
public $notificationId;
1819

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 Middleware
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
*

app/Models/Reply.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ final class Reply extends Model
3434
/**
3535
* {@inheritdoc}
3636
*/
37-
protected $with = ['likes'];
37+
protected $with = [
38+
'likes',
39+
];
3840

3941
public function id(): int
4042
{

composer.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,32 @@
88
"algolia/algoliasearch-client-php": "^2.2",
99
"algolia/scout-extended": "^1.9",
1010
"doctrine/dbal": "^2.5",
11-
"facade/ignition": "^1.0",
12-
"fideloper/proxy": "^4.0",
11+
"facade/ignition": "^2.0",
12+
"fideloper/proxy": "^4.2",
13+
"fruitcake/laravel-cors": "^1.0",
1314
"guzzlehttp/guzzle": "^6.3",
14-
"laravel/framework": "^6.0",
15-
"laravel/horizon": "^3.2.7",
16-
"laravel/socialite": "^4.2",
17-
"laravel/tinker": "^1.0",
15+
"laravel/framework": "^7.0",
16+
"laravel/horizon": "^4.0",
17+
"laravel/socialite": "^4.3",
18+
"laravel/tinker": "^2.0",
19+
"laravel/ui": "^2.0",
1820
"lasserafn/php-initial-avatar-generator": "^2.0",
1921
"league/commonmark": "^1.0",
2022
"league/flysystem-aws-s3-v3": "^1.0",
21-
"livewire/livewire": "^0.5.2",
23+
"livewire/livewire": "^1.0",
2224
"predis/predis": "^1.1",
2325
"ramsey/uuid": "^3.7",
2426
"roave/security-advisories": "dev-master",
25-
"spatie/laravel-backup": "^6.4",
26-
"spatie/laravel-feed": "^2.0",
27-
"spatie/laravel-robots-middleware": "^1.0"
27+
"spatie/laravel-backup": "^6.8",
28+
"spatie/laravel-feed": "^2.6",
29+
"spatie/laravel-robots-middleware": "^1.2"
2830
},
2931
"require-dev": {
30-
"facade/ignition": "^1.4",
3132
"fzaninotto/faker": "^1.9",
32-
"laravel/browser-kit-testing": "^5.1.3",
33-
"mockery/mockery": "^1.0",
34-
"nunomaduro/collision": "^3.0",
35-
"phpunit/phpunit": "^8.0"
33+
"laravel/browser-kit-testing": "^6.0",
34+
"mockery/mockery": "^1.3.1",
35+
"nunomaduro/collision": "^4.1",
36+
"phpunit/phpunit": "^8.5"
3637
},
3738
"autoload": {
3839
"classmap": [

0 commit comments

Comments
 (0)