Skip to content

Commit

Permalink
Upgraded to Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
willbrowningme committed May 15, 2024
1 parent e7a723d commit 5cf59c4
Show file tree
Hide file tree
Showing 64 changed files with 1,463 additions and 2,030 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.phpunit.cache
/node_modules
/public/hot
/public/storage
Expand All @@ -9,14 +10,18 @@
/storage/debugbar
/vendor
/postfix/vendor
/.fleet
/.idea
/.vscode
/.vagrant
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
.env
.env.backup
.env.production
.php-cs-fixer.cache
.phpunit.result.cache
ray.php
Expand Down
16 changes: 14 additions & 2 deletions app/Console/Commands/ReceiveEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,24 @@ protected function handleBounce($outboundMessage)
// Try to determine the bounce type, HARD, SPAM, SOFT
$bounceType = $this->getBounceType($dsn['Diagnostic-code'], $dsn['Status']);

$diagnosticCode = Str::limit($dsn['Diagnostic-code'], 497);
$diagnosticCode = trim(Str::limit($dsn['Diagnostic-code'], 497));
} else {
$bounceType = null;
$diagnosticCode = null;
}

// To sort '5.7.1 (delivery not authorized, message refused)' as status
if ($status = $dsn['Status'] ?? null) {

if (Str::length($status) > 5) {
if (is_null($diagnosticCode)) {
$diagnosticCode = trim(Str::substr($status, 5, 497));
}

$status = trim(Str::substr($status, 0, 5));
}
}

// Get the undelivered message
$undeliveredMessage = $attachments->filter(function ($attachment) {
return in_array($attachment->getContentType(), ['text/rfc822-headers', 'message/rfc822']);
Expand Down Expand Up @@ -394,7 +406,7 @@ protected function handleBounce($outboundMessage)
'sender' => $undeliveredMessageHeaders['X-anonaddy-original-sender'] ?? null,
'destination' => $bouncedEmailAddress,
'email_type' => $emailType,
'status' => $dsn['Status'] ?? null,
'status' => $status ?? null,
'code' => $diagnosticCode,
'attempted_at' => $outboundMessage->created_at,
]);
Expand Down
48 changes: 0 additions & 48 deletions app/Console/Kernel.php

This file was deleted.

27 changes: 0 additions & 27 deletions app/Exceptions/Handler.php

This file was deleted.

15 changes: 0 additions & 15 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\Models\Username;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
use Inertia\Inertia;
Expand Down Expand Up @@ -137,20 +136,6 @@ protected function sendFailedLoginResponse(Request $request)
]);
}

/**
* The user has been authenticated.
*
* @param mixed $user
* @return mixed
*/
protected function authenticated(Request $request, $user)
{
// Check if the user's password needs rehashing
if (Hash::needsRehash($user->password)) {
$user->update(['password' => Hash::make($request->password)]);
}
}

/**
* The user has logged out of the application.
*
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/VerificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class VerificationController extends Controller
*/
public function __construct()
{
$this->middleware('auth')->except('verify');
$this->middleware('auth');
$this->middleware('signed')->only('verify');
$this->middleware('throttle:1,1')->only('resend');
$this->middleware('throttle:6,1')->only('verify');
Expand Down
71 changes: 0 additions & 71 deletions app/Http/Kernel.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/Authenticate.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/EncryptCookies.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/PreventRequestsDuringMaintenance.php

This file was deleted.

30 changes: 0 additions & 30 deletions app/Http/Middleware/RedirectIfAuthenticated.php

This file was deleted.

18 changes: 0 additions & 18 deletions app/Http/Middleware/TrimStrings.php

This file was deleted.

28 changes: 0 additions & 28 deletions app/Http/Middleware/TrustProxies.php

This file was deleted.

Loading

0 comments on commit 5cf59c4

Please sign in to comment.