From c841c5c21210a1af73c676c39e1de77c8c8e7c26 Mon Sep 17 00:00:00 2001 From: Dendy Faist Date: Mon, 14 Apr 2025 02:02:48 +0200 Subject: [PATCH] fix: Don't use the new Class()->method() syntax yet To make it compatible with server's PHP 8.2 --- src/Controller/MainController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index c19c1c7..a59ac40 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -17,8 +17,8 @@ final class MainController extends AbstractController { $gitDir = $this->getParameter('kernel.project_dir') . '/var/data'; - new Process(['git', '-C', $gitDir, 'fetch'])->mustRun(); - new Process(['git', '-C', $gitDir, 'reset', '--hard', 'FETCH_HEAD'])->mustRun(); + (new Process(['git', '-C', $gitDir, 'fetch']))->mustRun(); + (new Process(['git', '-C', $gitDir, 'reset', '--hard', 'FETCH_HEAD']))->mustRun(); return new Response('Updated.'); } @@ -75,7 +75,7 @@ final class MainController extends AbstractController 'path' => $path, 'contents' => $contents, 'tree' => $tree, - 'version' => new Process(['git', '-C', $gitDir, 'log', '-1', '--oneline'])->mustRun()->getOutput(), + 'version' => (new Process(['git', '-C', $gitDir, 'log', '-1', '--oneline']))->mustRun()->getOutput(), ]); } }