Skip to content

Commit e9a87da

Browse files
committed
ISSUE-345: test
1 parent 080c00a commit e9a87da

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

composer.json

Lines changed: 3 additions & 17 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",
@@ -82,20 +82,6 @@
8282
"symfony-bin-dir": "bin",
8383
"symfony-var-dir": "var",
8484
"symfony-web-dir": "public",
85-
"symfony-tests-dir": "tests",
86-
"phplist/core": {
87-
"bundles": [
88-
"FOS\\RestBundle\\FOSRestBundle",
89-
"Symfony\\Bundle\\TwigBundle\\TwigBundle",
90-
"PhpList\\WebFrontend\\PhpListFrontendBundle"
91-
],
92-
"routes": {
93-
"rest-api": {
94-
"resource": "@PhpListFrontendBundle/Controller/",
95-
"type": "attribute",
96-
"prefix": "/"
97-
}
98-
}
99-
}
85+
"symfony-tests-dir": "tests"
10086
}
10187
}

config/bundles.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
return [
4+
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
5+
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
6+
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
7+
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
8+
PhpList\Core\EmptyStartPageBundle\EmptyStartPageBundle::class => ['all' => true],
9+
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
10+
PhpList\WebFrontend\PhpListFrontendBundle::class => ['all' => true],
11+
];

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.project_dir%/templates'

src/Controller/SecurityController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(ApiClient $apiClient, RequestStack $requestStack)
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)