Skip to content

Commit dbf4759

Browse files
committed
Deprecate null/empty string for secret argument
1 parent db2f206 commit dbf4759

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Component/Security/Http/RateLimiter/DefaultLoginRateLimiter.php

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ final class DefaultLoginRateLimiter extends AbstractRequestRateLimiter
3232

3333
public function __construct(RateLimiterFactory $globalFactory, RateLimiterFactory $localFactory, #[\SensitiveParameter] string $secret = null)
3434
{
35+
if (!$secret) {
36+
trigger_deprecation('symfony/security-http', '6.4', 'Calling "%s()" with an empty secret is deprecated, pass a non-empty string instead.', __METHOD__);
37+
}
3538
$this->globalFactory = $globalFactory;
3639
$this->localFactory = $localFactory;
3740
$this->secret = $secret;

0 commit comments

Comments
 (0)