-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Form] Document the hash_property_path
option
#15872
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abb2003
to
839808f
Compare
hash_mapping
optionhash_property_path
option
OskarStark
reviewed
Oct 10, 2022
OskarStark
reviewed
Oct 10, 2022
OskarStark
reviewed
Oct 10, 2022
d8ae8e7
to
5950427
Compare
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Oct 22, 2022
…e` (Seb33300) This PR was merged into the 6.2 branch. Discussion ---------- [Form] Add `hash_property_path` option to `PasswordType` | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #29066 | License | MIT | Doc PR | symfony/symfony-docs#15872 Same as #42883 but using a Form Extension and rebased to 6.1 & tests. This PR adds a new `hash_mapping` option to `PasswordType`. The `hash_mapping` option can be set with a property path where we want to set the hashed password. The `hash_mapping` option can only be used on unmapped fields to minimize plain password leak. Commits ------- 7065dfe [Form] Add hash_mapping option to PasswordType
This feature is now merged in 6.2 🎉 @javiereguiluz can we merge this PR? |
5950427
to
228d73e
Compare
Yes we can! Thanks for providing both feature and docs, @Seb33300! fyi, I've slightly updated the PR while merging (move the versionadded and add some more links). |
I think, we should also explain how to configure it on a |
If you want to create a PR to add it to the documentation: $builder->add('plainPassword', RepeatedType::class, [
'type' => PasswordType::class,
'first_options' => ['label' => 'Password', 'hash_property_path' => 'password'],
'second_options' => ['label' => 'Repeat Password'],
'mapped' => false,
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Documentation for symfony/symfony#46224