Skip to content

Commit 64b06f5

Browse files
committed
ISSUE-345: twig through core
1 parent 080c00a commit 64b06f5

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
},
3131
"require": {
3232
"php": "^8.1",
33-
"phplist/core": "v5.0.0-alpha7",
34-
"symfony/twig-bundle": "^6.4.0"
33+
"phplist/core": "dev-ISSUE-345",
34+
"symfony/twig-bundle": "^6.4"
3535
},
3636
"require-dev": {
3737
"phpunit/phpunit": "^9.5",
@@ -86,7 +86,6 @@
8686
"phplist/core": {
8787
"bundles": [
8888
"FOS\\RestBundle\\FOSRestBundle",
89-
"Symfony\\Bundle\\TwigBundle\\TwigBundle",
9089
"PhpList\\WebFrontend\\PhpListFrontendBundle"
9190
],
9291
"routes": {

config/packages/framework.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
framework:
2+
secret: '%kernel.secret%'
3+
http_method_override: false
4+
php_errors:
5+
log: true

config/packages/twig.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
twig:
2+
debug: '%kernel.debug%'
3+
strict_variables: '%kernel.debug%'
4+
default_path: '%kernel.application_dir%/templates'

src/Controller/SecurityController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public function __construct(ApiClient $apiClient, RequestStack $requestStack)
2525
$this->session = $requestStack->getSession();
2626
}
2727

28-
#[Route('', name: 'login', methods: ['GET', 'POST'])]
28+
#[Route('/login', name: 'login', methods: ['GET', 'POST'])]
2929
public function login(Request $request): Response
3030
{
3131
if ($this->session->has('auth_token')) {
32-
return $this->redirectToRoute('dashboard');
32+
return $this->redirectToRoute('empty_start_page');
3333
}
3434

3535
$error = null;
@@ -53,7 +53,7 @@ public function login(Request $request): Response
5353
$this->apiClient->setAuthToken($authData['token']);
5454

5555
// Redirect to dashboard
56-
return $this->redirectToRoute('dashboard');
56+
return $this->redirectToRoute('empty_start_page');
5757
} catch (Exception $e) {
5858
$error = 'Invalid credentials or server error: ' . $e->getMessage();
5959
} catch (GuzzleException $e) {

0 commit comments

Comments
 (0)