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:
		
							parent
							
								
									c3e012148c
								
							
						
					
					
						commit
						c841c5c212
					
				| 
						 | 
				
			
			@ -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(),
 | 
			
		||||
        ]);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue