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:
idevakk
2025-11-14 01:42:07 -08:00
parent 3706072ce5
commit 3892c48ef2
103 changed files with 1741 additions and 890 deletions

View File

@@ -2,6 +2,10 @@
namespace App\Models;
use Ddeboer\Imap\ConnectionInterface;
use DateTime;
use Exception;
use Log;
use App\ColorPicker;
use Carbon\Carbon;
use Ddeboer\Imap\Search\Email\Cc;
@@ -15,7 +19,7 @@ use Illuminate\Support\Facades\Cookie;
class Premium extends Model
{
use ColorPicker;
public static function connectMailBox($imap = null): \Ddeboer\Imap\ConnectionInterface
public static function connectMailBox($imap = null): ConnectionInterface
{
$imapDB = json_decode(config('app.settings.imap_settings'), true);
$imap = [
@@ -67,7 +71,7 @@ class Premium extends Model
$sender = $message->getFrom();
$date = $message->getDate();
if (!$date) {
$date = new \DateTime();
$date = new DateTime();
if ($message->getHeaders()->get('udate')) {
$date->setTimestamp($message->getHeaders()->get('udate'));
}
@@ -126,7 +130,7 @@ class Premium extends Model
$directory . $attachment->getFilename(),
$attachment->getDecodedContent()
);
} catch (\Exception $e) {
} catch (Exception $e) {
\Illuminate\Support\Facades\Log::error($e->getMessage());
}
}
@@ -527,8 +531,8 @@ class Premium extends Model
$usageLog->emails_created_history = $history;
$usageLog->save();
}
} catch (\Exception $exception) {
\Log::error($exception->getMessage());
} catch (Exception $exception) {
Log::error($exception->getMessage());
}
}