feature #16459 [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword() (nicolas-grekas)
This PR was merged into the 2.8 branch.
Discussion
----------
[Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #16014
| License | MIT
| Doc PR | -
Commits
-------
770bd8c
[Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()
This commit is contained in:
commit
2c6e9e495a
@ -71,6 +71,8 @@ class BCryptPasswordEncoder extends BasePasswordEncoder
|
|||||||
$options = array('cost' => $this->cost);
|
$options = array('cost' => $this->cost);
|
||||||
|
|
||||||
if ($salt) {
|
if ($salt) {
|
||||||
|
@trigger_error('Passing a $salt to '.__METHOD__.'() is deprecated since version 2.8 and will be ignored in 3.0.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
$options['salt'] = $salt;
|
$options['salt'] = $salt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user