Skip to content

Commit 7a7361f

Browse files
committed
bug symfony#57263 [SecurityBundle] Fix container.build_hash parameter binding (alexandre-daubois)
This PR was merged into the 7.1 branch. Discussion ---------- [SecurityBundle] Fix `container.build_hash` parameter binding | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#57257 | License | MIT Happened to us as well when trying to upgrade to 7.1, this PR fixes the param binding. Before: <img width="617" alt="Capture d’écran 2024-05-31 à 14 53 37" src="https://github.com/symfony/symfony/assets/2144837/5e703f83-4c24-4aa3-834d-515691c75e21"> After: <img width="617" alt="Capture d’écran 2024-05-31 à 14 52 56" src="https://github.com/symfony/symfony/assets/2144837/020c04c5-b7ad-4f5d-a6f4-85a0b09b9908"> Commits ------- ddef55e [SecurityBundle] Fix `container.build_hash` parameter binding
2 parents 54d6c0b + ddef55e commit 7a7361f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginThrottlingFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\DependencyInjection\ChildDefinition;
1717
use Symfony\Component\DependencyInjection\ContainerBuilder;
1818
use Symfony\Component\DependencyInjection\Exception\LogicException;
19+
use Symfony\Component\DependencyInjection\Parameter;
1920
use Symfony\Component\DependencyInjection\Reference;
2021
use Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface;
2122
use Symfony\Component\Lock\LockInterface;
@@ -76,7 +77,7 @@ public function createAuthenticator(ContainerBuilder $container, string $firewal
7677
$container->register($config['limiter'] = 'security.login_throttling.'.$firewallName.'.limiter', DefaultLoginRateLimiter::class)
7778
->addArgument(new Reference('limiter.'.$globalId))
7879
->addArgument(new Reference('limiter.'.$localId))
79-
->addArgument('%container.build_hash%')
80+
->addArgument(new Parameter('container.build_hash'))
8081
;
8182
}
8283

0 commit comments

Comments
 (0)