Skip to content

Commit f4a7ac8

Browse files
committed
minor #737 Reduce the BCrypt cost in tests to run them much faster (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Reduce the BCrypt cost in tests to run them much faster I learned this cool trick from this @taylorotwell tweet: https://twitter.com/taylorotwell/status/943135617466105856 In my local machine, tests went from 15 to 10 seconds! Commits ------- 54c2ebe Reduce the BCrypt cost in tests to run them much faster
2 parents 0d3e586 + 54c2ebe commit f4a7ac8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config/packages/test/security.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# this configuration simplifies testing URLs protected by the security mechanism
22
# See https://symfony.com/doc/current/cookbook/testing/http_authentication.html
33
security:
4+
encoders:
5+
# to make tests much faster, BCrypt cost is changed to its minimum allowed value (4)
6+
# See https://symfony.com/doc/current/reference/configuration/security.html#using-the-bcrypt-password-encoder
7+
App\Entity\User: { algorithm: bcrypt, cost: 4 }
8+
49
firewalls:
510
main:
611
http_basic: ~

0 commit comments

Comments
 (0)