Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -10,30 +10,18 @@
namespace App\Controller;
use App\Constants;
use App\Utils\PageSetup;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route(path="/about")
*/
class AboutController extends AbstractController
#[Route(path: '/about')]
final class AboutController extends AbstractController
{
/**
* @var string
*/
protected $projectDirectory;
/**
* @param string $projectDirectory
*/
public function __construct(string $projectDirectory)
public function __construct(private string $projectDirectory)
{
$this->projectDirectory = $projectDirectory;
}
/**
* @Route(path="", name="about", methods={"GET"})
*/
#[Route(path: '', name: 'about', methods: ['GET'])]
public function license(): Response
{
$filename = $this->projectDirectory . '/LICENSE';
@@ -47,10 +35,11 @@ class AboutController extends AbstractController
if (false === $license) {
$license = 'Failed reading license file: ' . $filename . '. ' .
'Check this instead: ' . Constants::GITHUB . 'blob/master/LICENSE';
'Check this instead: ' . Constants::GITHUB . 'blob/main/LICENSE';
}
return $this->render('about/license.html.twig', [
'page_setup' => new PageSetup('about.title'),
'license' => $license
]);
}