Skip to content

Commit

Permalink
Add security bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn committed Sep 24, 2023
1 parent b7bba1f commit 90026a8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ public function registerContainerConfiguration(LoaderInterface $loader)

$context = $this->getContext();
$loader->load(__DIR__ . '/config/config_' . $context . '.yml');

if (\version_compare(Kernel::VERSION, '6.0.0', '>=')) {
$loader->load(__DIR__ . '/config/security-6.yml');
} else {
$loader->load(__DIR__ . '/config/security-5-4.yml');
}
}

protected function getKernelParameters(): array
Expand Down
4 changes: 1 addition & 3 deletions Tests/Application/config/config_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ security:
access_decision_manager:
strategy: affirmative

password_hashers:
Sulu\Bundle\SecurityBundle\Entity\User: plaintext

providers:
testprovider:
id: test_user_provider
Expand All @@ -22,6 +19,7 @@ security:
firewalls:
test:
http_basic: ~
anonymous: ~

sulu_test:
enable_test_user_provider: true
Expand Down
3 changes: 3 additions & 0 deletions Tests/Application/config/security-5-4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
security:
encoders:
Sulu\Bundle\SecurityBundle\Entity\User: plaintext
3 changes: 3 additions & 0 deletions Tests/Application/config/security-6-0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
security:
password_hashers:
Sulu\Bundle\SecurityBundle\Entity\User: plaintext

0 comments on commit 90026a8

Please sign in to comment.