projectDirectory . '/LICENSE'; try { $license = file_get_contents($filename); } catch (\Exception $ex) { $this->logException($ex); $license = false; } if (false === $license) { $license = 'Failed reading license file: ' . $filename . '. ' . 'Check this instead: ' . Constants::GITHUB . 'blob/main/LICENSE'; } return $this->render('about/license.html.twig', [ 'page_setup' => new PageSetup('about.title'), 'license' => $license ]); } }