mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API checkHistoricalPasswords(), characterStrength() and minLength() are now correctly deprecated from 4.5.0 onwards (#9008)
API checkHistoricalPasswords(), characterStrength() and minLength() are now correctly deprecated from 4.5.0 onwards
This commit is contained in:
commit
0520d77461
10
docs/en/04_Changelogs/4.5.0.md
Normal file
10
docs/en/04_Changelogs/4.5.0.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# 4.5.0 (Unreleased)
|
||||||
|
|
||||||
|
## Overview {#overview}
|
||||||
|
|
||||||
|
TBC.
|
||||||
|
|
||||||
|
## Deprecation
|
||||||
|
|
||||||
|
* `PasswordValidator` methods `minLength`, `characterStrength`, and `checkHistoricalPasswords` are now deprecated from
|
||||||
|
4.5.0 onwards (previously 5.0).
|
@ -76,7 +76,7 @@ class PasswordValidator
|
|||||||
protected $historicalPasswordCount = null;
|
protected $historicalPasswordCount = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 5.0
|
* @deprecated 4.5.0
|
||||||
* Minimum password length
|
* Minimum password length
|
||||||
*
|
*
|
||||||
* @param int $minLength
|
* @param int $minLength
|
||||||
@ -84,12 +84,12 @@ class PasswordValidator
|
|||||||
*/
|
*/
|
||||||
public function minLength($minLength)
|
public function minLength($minLength)
|
||||||
{
|
{
|
||||||
Deprecation::notice('5.0', 'Use ->setMinLength($value) instead.');
|
Deprecation::notice('4.5.0', 'Use ->setMinLength($value) instead.');
|
||||||
return $this->setMinLength($minLength);
|
return $this->setMinLength($minLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 5.0
|
* @deprecated 4.5.0
|
||||||
* Check the character strength of the password.
|
* Check the character strength of the password.
|
||||||
*
|
*
|
||||||
* Eg: $this->characterStrength(3, array("lowercase", "uppercase", "digits", "punctuation"))
|
* Eg: $this->characterStrength(3, array("lowercase", "uppercase", "digits", "punctuation"))
|
||||||
@ -101,8 +101,8 @@ class PasswordValidator
|
|||||||
public function characterStrength($minScore, $testNames = null)
|
public function characterStrength($minScore, $testNames = null)
|
||||||
{
|
{
|
||||||
Deprecation::notice(
|
Deprecation::notice(
|
||||||
'5.0',
|
'4.5.0',
|
||||||
'Use ->setMinTestScore($score) and ->setTextNames($names) instead.'
|
'Use ->setMinTestScore($score) and ->setTestNames($names) instead.'
|
||||||
);
|
);
|
||||||
$this->setMinTestScore($minScore);
|
$this->setMinTestScore($minScore);
|
||||||
if ($testNames) {
|
if ($testNames) {
|
||||||
@ -112,7 +112,7 @@ class PasswordValidator
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 5.0
|
* @deprecated 4.5.0
|
||||||
* Check a number of previous passwords that the user has used, and don't let them change to that.
|
* Check a number of previous passwords that the user has used, and don't let them change to that.
|
||||||
*
|
*
|
||||||
* @param int $count
|
* @param int $count
|
||||||
@ -120,7 +120,7 @@ class PasswordValidator
|
|||||||
*/
|
*/
|
||||||
public function checkHistoricalPasswords($count)
|
public function checkHistoricalPasswords($count)
|
||||||
{
|
{
|
||||||
Deprecation::notice('5.0', 'Use ->setHistoricCount($value) instead.');
|
Deprecation::notice('4.5.0', 'Use ->setHistoricCount($value) instead.');
|
||||||
return $this->setHistoricCount($count);
|
return $this->setHistoricCount($count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user