Skip to content

Commit 887d350

Browse files
Merge pull request #35 from ExposureSoftware/shift-157063
Laravel 12.x Shift
2 parents a24c290 + a683753 commit 887d350

14 files changed

Lines changed: 65 additions & 55 deletions

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ APP_FALLBACK_LOCALE=en
99
APP_FAKER_LOCALE=en_US
1010
APP_MAINTENANCE_DRIVER=file
1111
APP_MAINTENANCE_STORE=database
12+
PHP_CLI_SERVER_WORKERS=4
13+
1214
BCRYPT_ROUNDS=12
1315

1416
LOG_CHANNEL=stack
@@ -39,7 +41,7 @@ MAIL_HOST=smtp.mailtrap.io
3941
MAIL_PORT=2525
4042
MAIL_USERNAME=null
4143
MAIL_PASSWORD=null
42-
MAIL_ENCRYPTION=null
44+
MAIL_SCHEME=null
4345

4446
AWS_ACCESS_KEY_ID=
4547
AWS_SECRET_ACCESS_KEY=

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/public/hot
33
/public/storage
44
/storage/*.key
5+
/storage/pail
56
/vendor
67
.env
78
/.phpunit.cache
@@ -15,3 +16,4 @@ public/css
1516
public/assets
1617
exposure.conf
1718
exposure.env
19+
/.nova

app/Http/Controllers/Auth/ConfirmPasswordController.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
use App\Http\Controllers\Controller;
66
use App\Providers\AppServiceProvider;
77
use Illuminate\Foundation\Auth\ConfirmsPasswords;
8+
use Illuminate\Routing\Controllers\HasMiddleware;
89

9-
class ConfirmPasswordController extends Controller
10+
class ConfirmPasswordController extends Controller implements HasMiddleware
1011
{
1112
/*
1213
|--------------------------------------------------------------------------
@@ -28,13 +29,10 @@ class ConfirmPasswordController extends Controller
2829
*/
2930
protected $redirectTo = AppServiceProvider::HOME;
3031

31-
/**
32-
* Create a new controller instance.
33-
*
34-
* @return void
35-
*/
36-
public function __construct()
32+
public static function middleware(): array
3733
{
38-
$this->middleware('auth');
34+
return [
35+
'auth',
36+
];
3937
}
4038
}

app/Http/Controllers/Auth/LoginController.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
use App\Http\Controllers\Controller;
66
use App\Providers\AppServiceProvider;
77
use Illuminate\Foundation\Auth\AuthenticatesUsers;
8+
use Illuminate\Routing\Controllers\HasMiddleware;
9+
use Illuminate\Routing\Controllers\Middleware;
810

9-
class LoginController extends Controller
11+
class LoginController extends Controller implements HasMiddleware
1012
{
1113
/*
1214
|--------------------------------------------------------------------------
@@ -28,13 +30,10 @@ class LoginController extends Controller
2830
*/
2931
protected $redirectTo = AppServiceProvider::HOME;
3032

31-
/**
32-
* Create a new controller instance.
33-
*
34-
* @return void
35-
*/
36-
public function __construct()
33+
public static function middleware(): array
3734
{
38-
$this->middleware('guest')->except('logout');
35+
return [
36+
new Middleware('guest', except: ['logout']),
37+
];
3938
}
4039
}

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
use App\Providers\AppServiceProvider;
77
use App\User;
88
use Illuminate\Foundation\Auth\RegistersUsers;
9+
use Illuminate\Routing\Controllers\HasMiddleware;
910
use Illuminate\Support\Facades\Hash;
1011
use Illuminate\Support\Facades\Validator;
1112

12-
class RegisterController extends Controller
13+
class RegisterController extends Controller implements HasMiddleware
1314
{
1415
/*
1516
|--------------------------------------------------------------------------
@@ -31,14 +32,11 @@ class RegisterController extends Controller
3132
*/
3233
protected $redirectTo = AppServiceProvider::HOME;
3334

34-
/**
35-
* Create a new controller instance.
36-
*
37-
* @return void
38-
*/
39-
public function __construct()
35+
public static function middleware(): array
4036
{
41-
$this->middleware('guest');
37+
return [
38+
'guest',
39+
];
4240
}
4341

4442
/**

app/Http/Controllers/Auth/VerificationController.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
use App\Http\Controllers\Controller;
66
use App\Providers\AppServiceProvider;
77
use Illuminate\Foundation\Auth\VerifiesEmails;
8+
use Illuminate\Routing\Controllers\HasMiddleware;
9+
use Illuminate\Routing\Controllers\Middleware;
810

9-
class VerificationController extends Controller
11+
class VerificationController extends Controller implements HasMiddleware
1012
{
1113
/*
1214
|--------------------------------------------------------------------------
@@ -28,15 +30,12 @@ class VerificationController extends Controller
2830
*/
2931
protected $redirectTo = AppServiceProvider::HOME;
3032

31-
/**
32-
* Create a new controller instance.
33-
*
34-
* @return void
35-
*/
36-
public function __construct()
33+
public static function middleware(): array
3734
{
38-
$this->middleware('auth');
39-
$this->middleware('signed')->only('verify');
40-
$this->middleware('throttle:6,1')->only('verify', 'resend');
35+
return [
36+
'auth',
37+
new Middleware('signed', only: ['verify']),
38+
new Middleware('throttle:6,1', only: ['verify', 'resend']),
39+
];
4140
}
4241
}

app/Http/Controllers/Controller.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@
22

33
namespace App\Http\Controllers;
44

5-
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
6-
use Illuminate\Foundation\Validation\ValidatesRequests;
7-
use Illuminate\Routing\Controller as BaseController;
8-
9-
abstract class Controller extends BaseController
10-
{
11-
use AuthorizesRequests, ValidatesRequests;
12-
}
5+
abstract class Controller {}

artisan

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4+
use Illuminate\Foundation\Application;
45
use Symfony\Component\Console\Input\ArgvInput;
56

67
define('LARAVEL_START', microtime(true));
@@ -9,7 +10,9 @@ define('LARAVEL_START', microtime(true));
910
require __DIR__.'/vendor/autoload.php';
1011

1112
// Bootstrap Laravel and handle the command...
12-
$status = (require_once __DIR__.'/bootstrap/app.php')
13-
->handleCommand(new ArgvInput);
13+
/** @var Application $app */
14+
$app = require_once __DIR__.'/bootstrap/app.php';
15+
16+
$status = $app->handleCommand(new ArgvInput);
1417

1518
exit($status);

composer.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
"license": "MIT",
77
"require": {
88
"php": "^8.2",
9-
"laravel/framework": "^11.45",
10-
"laravel/tinker": "^2.9",
11-
"laravel/ui": "^4.4",
9+
"laravel/framework": "^12.25",
10+
"laravel/tinker": "^2.10.1",
11+
"laravel/ui": "^4.6",
1212
"league/flysystem-aws-s3-v3": "^3.0"
1313
},
1414
"require-dev": {
1515
"mockery/mockery": "^1.6",
16-
"nunomaduro/collision": "^8.0",
17-
"phpunit/phpunit": "^11.0.1",
18-
"fakerphp/faker": "^1.23"
16+
"nunomaduro/collision": "^8.6",
17+
"phpunit/phpunit": "^11.5.3",
18+
"fakerphp/faker": "^1.23",
19+
"laravel/pail": "^1.2.2"
1920
},
2021
"config": {
2122
"optimize-autoloader": true,
@@ -54,6 +55,10 @@
5455
],
5556
"post-update-cmd": [
5657
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
58+
],
59+
"dev": [
60+
"Composer\\Config::disableProcessTimeout",
61+
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
5762
]
5863
}
5964
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"vue": "^2.5.17",
2727
"vue-loader": "^15.9.7",
2828
"vue-template-compiler": "^2.6.11",
29-
"waypoints": "^4.0.1"
29+
"waypoints": "^4.0.1",
30+
"concurrently": "^9.0.1"
3031
},
3132
"dependencies": {
3233
"headroom.js": "^0.11.0",

0 commit comments

Comments
 (0)