Skip to content

Commit 8aeceab

Browse files
authored
Fix the configuration for custom password strength estimator
1 parent 53ea654 commit 8aeceab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: reference/constraints/PasswordStrength.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ service to use your own estimator:
178178
class: App\Validator\CustomPasswordStrengthEstimator
179179
180180
Symfony\Component\Validator\Constraints\PasswordStrengthValidator:
181-
arguments: [!service_closure '@custom_password_strength_estimator']
181+
arguments: [!closure '@custom_password_strength_estimator']
182182
183183
.. code-block:: xml
184184
@@ -192,7 +192,7 @@ service to use your own estimator:
192192
<service id="custom_password_strength_estimator" class="App\Validator\CustomPasswordStrengthEstimator"/>
193193
194194
<service id="Symfony\Component\Validator\Constraints\PasswordStrengthValidator">
195-
<argument type="service_closure" id="custom_password_strength_estimator"/>
195+
<argument type="closure" id="custom_password_strength_estimator"/>
196196
</service>
197197
</services>
198198
</container>
@@ -210,5 +210,5 @@ service to use your own estimator:
210210
$services->set('custom_password_strength_estimator', CustomPasswordStrengthEstimator::class);
211211
212212
$services->set(PasswordStrengthValidator::class)
213-
->args([service_closure('custom_password_strength_estimator')]);
213+
->args([closure('custom_password_strength_estimator')]);
214214
};

0 commit comments

Comments
 (0)