From 5b6f70a3428a09879da1e82583ee2008039818ee Mon Sep 17 00:00:00 2001 From: David Jardin Date: Sun, 17 Nov 2024 15:06:00 +0100 Subject: [PATCH] convert to app call --- app/Jobs/CheckSiteHealth.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Jobs/CheckSiteHealth.php b/app/Jobs/CheckSiteHealth.php index f4cae0a..16d072e 100644 --- a/app/Jobs/CheckSiteHealth.php +++ b/app/Jobs/CheckSiteHealth.php @@ -10,6 +10,7 @@ use Carbon\Carbon; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Queue\Queueable; +use Illuminate\Support\Facades\App; class CheckSiteHealth implements ShouldQueue { @@ -42,7 +43,9 @@ public function handle(): void $this->site->save(); // Check if a newer Joomla version for that site is available - $latestVersion = (new TufFetcher())->getLatestVersionForBranch((int) $this->site->cms_version[0]); + /** @var TufFetcher $tufFetcher */ + $tufFetcher = App::make(TufFetcher::class); + $latestVersion = $tufFetcher->getLatestVersionForBranch((int) $this->site->cms_version[0]); // Available version is not newer, exit if (!version_compare($latestVersion, $this->site->cms_version, ">")) {