Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit baa827d

Browse files
author
DKravtsov
committed
Laravel 10, updated composer dependencies.
1 parent 6eead8e commit baa827d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2622
-1028
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ reports/*
2121
npm-debug.log
2222
yarn-error.log
2323
.phpunit.result.cache
24+
.phpunit.cache
2425
###> friendsofphp/php-cs-fixer ###
2526
.php-cs-fixer.cache
2627
.php_cs

‎app/Http/Controllers/Controller.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
namespace App\Http\Controllers;
66

77
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
8-
use Illuminate\Foundation\Bus\DispatchesJobs;
98
use Illuminate\Foundation\Validation\ValidatesRequests;
109
use Illuminate\Routing\Controller as BaseController;
1110

1211
class Controller extends BaseController
1312
{
1413
use AuthorizesRequests;
15-
use DispatchesJobs;
1614
use ValidatesRequests;
1715
}

‎app/Http/Kernel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ class Kernel extends HttpKernel
4242

4343
'api' => [
4444
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
45-
'throttle:api',
45+
\Illuminate\Routing\Middleware\ThrottleRequests::class . ':api',
4646
\Illuminate\Routing\Middleware\SubstituteBindings::class,
4747
],
4848
];
4949

5050
/**
51-
* The application's route middleware.
51+
* The application's middleware aliases.
5252
*
53-
* These middleware may be assigned to groups or used individually.
53+
* Aliases may be used to conveniently assign middleware to routes and groups.
5454
*
5555
* @var array<string, class-string|string>
5656
*/
57-
protected $routeMiddleware = [
57+
protected $middlewareAliases = [
5858
'auth' => \App\Http\Middleware\Authenticate::class,
5959
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
6060
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,

‎app/Http/Middleware/Authenticate.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,15 @@
55
namespace App\Http\Middleware;
66

77
use Illuminate\Auth\Middleware\Authenticate as Middleware;
8+
use Illuminate\Http\Request;
89

910
class Authenticate extends Middleware
1011
{
1112
/**
1213
* Get the path the user should be redirected to when they are not authenticated.
13-
*
14-
* @param \Illuminate\Http\Request $request
15-
* @return string|null
1614
*/
17-
protected function redirectTo($request)
15+
protected function redirectTo(Request$request): ?string
1816
{
19-
if (!$request->expectsJson()) {
20-
return route('login');
21-
}
17+
return $request->expectsJson() ? null : route('login');
2218
}
2319
}

‎app/Http/Middleware/RedirectIfAuthenticated.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88
use Closure;
99
use Illuminate\Http\Request;
1010
use Illuminate\Support\Facades\Auth;
11+
use Symfony\Component\HttpFoundation\Response;
1112

1213
class RedirectIfAuthenticated
1314
{
1415
/**
1516
* Handle an incoming request.
1617
*
17-
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
18-
* @param string|null ...$guards
19-
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
18+
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
2019
*/
21-
public function handle(Request $request, Closure $next, ...$guards)
20+
public function handle(Request $request, Closure $next, string...$guards): Response
2221
{
2322
$guards = empty($guards) ? [null] : $guards;
2423

‎app/Providers/AuthServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ class AuthServiceProvider extends ServiceProvider
2424
*/
2525
public function boot(): void
2626
{
27-
$this->registerPolicies();
2827
}
2928
}

‎composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,22 @@
2929
"ext-pdo": "*",
3030
"ext-pdo_mysql": "*",
3131
"guzzlehttp/guzzle": "^7.5",
32-
"jaybizzle/laravel-migrations-organiser": "^6.2",
33-
"laravel/framework": "^9.48",
34-
"laravel/sanctum": "^3.0",
35-
"laravel/tinker": "^2.7"
32+
"jaybizzle/laravel-migrations-organiser": "^6.3",
33+
"laravel/framework": "^10.0",
34+
"laravel/sanctum": "^3.2",
35+
"laravel/tinker": "^2.8"
3636
},
3737
"require-dev": {
3838
"bamarni/composer-bin-plugin": "^1.8",
39-
"barryvdh/laravel-ide-helper": "^2.12",
39+
"barryvdh/laravel-ide-helper": "^2.13",
4040
"fakerphp/faker": "^1.9",
4141
"laravel/pint": "^1.0",
42-
"laravel/sail": "^1.0",
42+
"laravel/sail": "^1.18",
4343
"mockery/mockery": "^1.4",
4444
"neronmoon/scriptsdev": "^0.1",
45-
"nunomaduro/collision": "^6.1",
46-
"spatie/laravel-ignition": "^1.0",
45+
"nunomaduro/collision": "^7.0",
46+
"spatie/laravel-ignition": "^2.0",
47+
"phpunit/phpunit": "^10.0",
4748
"roave/security-advisories": "dev-latest"
4849
},
4950
"config": {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /