Skip to content

Commit 65e9e91

Browse files
Merge pull request #1026 from kbond/test-pw-hash
2 parents 40e4f43 + 6c66020 commit 65e9e91

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

symfony/security-bundle/5.3/config/packages/security.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,16 @@ security:
2525
access_control:
2626
# - { path: ^/admin, roles: ROLE_ADMIN }
2727
# - { path: ^/profile, roles: ROLE_USER }
28+
29+
when@test:
30+
security:
31+
password_hashers:
32+
# By default, password hashers are resource intensive and take time. This is
33+
# important to generate secure password hashes. In tests however, secure hashes
34+
# are not important, waste resources and increase test times. The following
35+
# reduces the work factor to the lowest possible values.
36+
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
37+
algorithm: auto
38+
cost: 4 # Lowest possible value for bcrypt
39+
time_cost: 3 # Lowest possible value for argon
40+
memory_cost: 10 # Lowest possible value for argon

0 commit comments

Comments
 (0)