Skip to content

Commit

Permalink
convert to app call
Browse files Browse the repository at this point in the history
  • Loading branch information
SniperSister committed Nov 17, 2024
1 parent 7621332 commit 5b6f70a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Jobs/CheckSiteHealth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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, ">")) {
Expand Down

0 comments on commit 5b6f70a

Please sign in to comment.