fix: Don't use the new Class()->method() syntax yet

To make it compatible with server's PHP 8.2
This commit is contained in:
Dendy 2025-04-14 02:02:48 +02:00
parent c3e012148c
commit c841c5c212
1 changed files with 3 additions and 3 deletions

View File

@ -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(),
]);
}
}