From 3c6c0ed74e5bcce08a1328d016e387c793523f0f Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 23 Nov 2025 00:57:51 +0100 Subject: [PATCH 1/2] Rename firewall from secured_area to default main --- app/config/config.yml | 2 +- app/config/security.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index e170430b7..5d4baeb88 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -190,7 +190,7 @@ nelmio_cors: fos_user: db_driver: orm - firewall_name: secured_area + firewall_name: main user_class: Wallabag\Entity\User registration: confirmation: diff --git a/app/config/security.yml b/app/config/security.yml index bced6bf20..c73d48a33 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -37,7 +37,7 @@ security: pattern: ^/login$ anonymous: ~ - secured_area: + main: pattern: ^/ form_login: provider: fos_userbundle From a2497d9ce8538781d8fe6863173320a56dc516a0 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 23 Nov 2025 00:59:35 +0100 Subject: [PATCH 2/2] Remove need to pass firewall name to log in in tests One less usage of parameters in tests --- tests/Controller/Api/WallabagApiTestCase.php | 3 +-- tests/WallabagTestCase.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/Controller/Api/WallabagApiTestCase.php b/tests/Controller/Api/WallabagApiTestCase.php index e04020a6f..603b0ca86 100644 --- a/tests/Controller/Api/WallabagApiTestCase.php +++ b/tests/Controller/Api/WallabagApiTestCase.php @@ -46,14 +46,13 @@ abstract class WallabagApiTestCase extends WebTestCase /** @var UserManager $userManager */ $userManager = $container->get('fos_user.user_manager'); - $firewallName = $container->getParameter('fos_user.firewall_name'); $adminUser = $userManager->findUserBy(['username' => 'admin']); \assert($adminUser instanceof User); $this->user = $adminUser; - $client->loginUser($adminUser, $firewallName); + $client->loginUser($adminUser); return $client; } diff --git a/tests/WallabagTestCase.php b/tests/WallabagTestCase.php index 9b31f8029..6460dd426 100644 --- a/tests/WallabagTestCase.php +++ b/tests/WallabagTestCase.php @@ -53,7 +53,6 @@ abstract class WallabagTestCase extends WebTestCase $container = static::getContainer(); $userManager = $container->get('fos_user.user_manager'); - $firewallName = $container->getParameter('fos_user.firewall_name'); $user = $userManager->findUserBy(['username' => $username]); @@ -61,7 +60,7 @@ abstract class WallabagTestCase extends WebTestCase throw new \Exception('Unable to find user "' . $username . '". Does fixtures were loaded?'); } - $this->client->loginUser($user, $firewallName); + $this->client->loginUser($user); } /**