Skip to content

[Validator] Make PasswordStrengthValidator::estimateStrength() public #19903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
derrabus opened this issue May 21, 2024 · 5 comments
Closed

[Validator] Make PasswordStrengthValidator::estimateStrength() public #19903

derrabus opened this issue May 21, 2024 · 5 comments
Labels
hasPR A Pull Request has already been submitted for this issue. Validator
Milestone

Comments

@derrabus
Copy link
Member

Q A
Feature PR symfony/symfony#54881
PR author(s) @yalit
Merged in 7.2

We created this issue to not forget to document this new feature. We would really appreciate if you can help us with this task. If you are not sure how to do it, please ask us and we will help you.

To fix this issue, please create a PR against the 7.2 branch in the symfony-docs repository.

Thank you! 😃

@derrabus
Copy link
Member Author

See my comment symfony/symfony#54881 (comment): We should document how we can leverage AutowireCallable to gain access to the password strength computation in arbitrary services.

@yalit
Copy link
Contributor

yalit commented May 21, 2024

For the documentation, do we update the validator documentation? I've not seen a dedicated PasswordStrength constraint documentation

And for the autowiring so we update the generic container documentation or do we add it linked to the constraint/validator doc?

@xabbuh xabbuh added this to the 7.2 milestone May 21, 2024
@yalit
Copy link
Contributor

yalit commented May 21, 2024

I was looking on my phone, now that's it's cloned, I found the PasswordStrength doc file.

As there is no dedicated documentation for the Validator itself and only for the constraint, I would proposeto add a section "Learn more" at the end of the PasswordStrength constraint doc page that would link to a new page:

  • How to get or override the estimated strength computation

The new page would simply indicate :

  1. that the method estimateStrength in the Validator is now public (+ providing a link to the lines in the code)
  2. if that method is not aligned with the needs, there is a way to udpate the estimation method for the Validator using a dedicated closure as argument of the Validator and refer to the following page of the container doc : https://symfony.com/doc/current/service_container/service_closures.html

Would that be a good fit? I'm willing to take a shot at this but it will be my first time updating the documentation, so I might need some guidance (reading the contributing guidelines is ongoing).

@derrabus
Copy link
Member Author

Sounds good to me. Feel free to submit a first draft and we iterate from there.

@xabbuh xabbuh added the hasPR A Pull Request has already been submitted for this issue. label May 22, 2024
javiereguiluz added a commit that referenced this issue May 28, 2024
…ed documentation (yalit)

This PR was squashed before being merged into the 7.2 branch.

Discussion
----------

[Validator] feat : add password strength estimator related documentation

This PR fixes #19903

Commits
-------

92d1b5a [Validator] feat : add password strength estimator related documentation
@javiereguiluz
Copy link
Member

Closing as fixed in #19910.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hasPR A Pull Request has already been submitted for this issue. Validator
Projects
None yet
Development

No branches or pull requests

5 participants