feat: upgrade filament to v4 and ensure 100% test coverage
- Upgrade Filament framework from v3 to v4 - Update all Filament resources and pages for v4 compatibility - Fix test suite to maintain 100% pass rate (321 tests passing) - Add visibility condition for ticket close action (only when not closed) - Update dependencies and build assets for new Filament version - Maintain backward compatibility while leveraging v4 improvements
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Auth\Events\Verified;
|
||||
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
||||
@@ -19,7 +20,7 @@ class VerifyEmailController extends Controller
|
||||
}
|
||||
|
||||
if ($request->user()->markEmailAsVerified()) {
|
||||
/** @var \Illuminate\Contracts\Auth\MustVerifyEmail $user */
|
||||
/** @var MustVerifyEmail $user */
|
||||
$user = $request->user();
|
||||
|
||||
event(new Verified($user));
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Log;
|
||||
use Exception;
|
||||
use App\NotifyMe;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -17,7 +19,7 @@ class WebhookController extends Controller
|
||||
|
||||
// Validate request data
|
||||
if (!$data || !isset($data['type']) || !in_array($data['type'], ['invoice', 'payment_link', 'payout'])) {
|
||||
\Log::warning('Invalid Oxapay webhook data', ['data' => $data]);
|
||||
Log::warning('Invalid Oxapay webhook data', ['data' => $data]);
|
||||
return response('Invalid data.type', 400);
|
||||
}
|
||||
|
||||
@@ -42,7 +44,7 @@ class WebhookController extends Controller
|
||||
$orderId = $data['order_id'] ?? 'N/A';
|
||||
$date = isset($data['date']) ? Carbon::createFromTimestamp($data['date'])->toDateTimeString() : now()->toDateTimeString();
|
||||
|
||||
\Log::info('Received Oxapay invoice payment callback', [
|
||||
Log::info('Received Oxapay invoice payment callback', [
|
||||
'track_id' => $trackId,
|
||||
'email' => $email,
|
||||
'amount' => $amount,
|
||||
@@ -69,7 +71,7 @@ class WebhookController extends Controller
|
||||
$description = $data['description'] ?? 'N/A';
|
||||
$date = isset($data['date']) ? Carbon::createFromTimestamp($data['date'])->toDateTimeString() : now()->toDateTimeString();
|
||||
|
||||
\Log::info('Received Oxapay payout callback', [
|
||||
Log::info('Received Oxapay payout callback', [
|
||||
'track_id' => $trackId,
|
||||
'status' => $data['status'] ?? 'Unknown',
|
||||
'amount' => $amount,
|
||||
@@ -93,8 +95,8 @@ class WebhookController extends Controller
|
||||
}
|
||||
|
||||
return response('OK', 200);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error('Oxapay webhook processing error', ['error' => $e->getMessage(), 'data' => $data]);
|
||||
} catch (Exception $e) {
|
||||
Log::error('Oxapay webhook processing error', ['error' => $e->getMessage(), 'data' => $data]);
|
||||
self::sendTelegramNotification("
|
||||
Failed to process Oxapay webhook\n
|
||||
Type: {$data['type']}\n
|
||||
@@ -104,7 +106,7 @@ class WebhookController extends Controller
|
||||
return response('Processing error', 400);
|
||||
}
|
||||
} else {
|
||||
\Log::warning('Invalid Oxapay HMAC signature', ['hmac_header' => $hmacHeader, 'calculated_hmac' => $calculatedHmac]);
|
||||
Log::warning('Invalid Oxapay HMAC signature', ['hmac_header' => $hmacHeader, 'calculated_hmac' => $calculatedHmac]);
|
||||
return response('Invalid HMAC signature', 400);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user