Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-05-27 04:58:30 +0300
committerGitHub <noreply@github.com>2021-05-27 04:58:30 +0300
commitc973567705a0065fdd7d7c7b11b80f1f0f1be350 (patch)
tree89947dbce864ac48389c742fce31d30106eebada /plugins/TwoFactorAuth
parent70b05de003487a31495bb9927017606a2faab7dd (diff)
Update PHP extension requirements & deprecate Common::mb_* methods (#16754)
* Require polyfill for mbstring and iconv * remove mbstring methods from upgrade.php * remove checks for some php extensions * deprecate Common::mb_* methods, as we can directly use mb_* functions instead * updates expected test files * Directly use mb_* methods in favor of Common::mb_* * Update expected screenshot Co-authored-by: diosmosis <diosmosis@users.noreply.github.com>
Diffstat (limited to 'plugins/TwoFactorAuth')
-rw-r--r--plugins/TwoFactorAuth/Dao/RecoveryCodeDao.php2
-rw-r--r--plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php2
-rw-r--r--plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php2
-rw-r--r--plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php2
-rw-r--r--plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php2
5 files changed, 5 insertions, 5 deletions
diff --git a/plugins/TwoFactorAuth/Dao/RecoveryCodeDao.php b/plugins/TwoFactorAuth/Dao/RecoveryCodeDao.php
index 4445edec07..10b2f6ef70 100644
--- a/plugins/TwoFactorAuth/Dao/RecoveryCodeDao.php
+++ b/plugins/TwoFactorAuth/Dao/RecoveryCodeDao.php
@@ -38,7 +38,7 @@ class RecoveryCodeDao
for ($i = 0; $i < 10; $i++) {
$code = $this->generator->generateCode();
- $code = Common::mb_strtoupper($code);
+ $code = mb_strtoupper($code);
$this->insertRecoveryCode($login, $code);
$codes[] = $code;
}
diff --git a/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php b/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php
index cc51316e33..d47292d09c 100644
--- a/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php
+++ b/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeRandomGeneratorTest.php
@@ -33,7 +33,7 @@ class RecoveryCodeRandomGeneratorTest extends IntegrationTestCase
public function test_generatorCode_length()
{
- $this->assertSame(16, Common::mb_strlen($this->generator->generateCode()));
+ $this->assertSame(16, mb_strlen($this->generator->generateCode()));
}
public function test_generatorCode_alwaysDifferent()
diff --git a/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php b/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php
index 1d5193208d..a5668ebb17 100644
--- a/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php
+++ b/plugins/TwoFactorAuth/tests/Integration/Dao/RecoveryCodeStaticGeneratorTest.php
@@ -33,7 +33,7 @@ class RecoveryCodeStaticGeneratorTest extends IntegrationTestCase
public function test_generatorCode_length()
{
- $this->assertSame(16, Common::mb_strlen($this->generator->generateCode()));
+ $this->assertSame(16, mb_strlen($this->generator->generateCode()));
}
public function test_generatorCode_alwaysDifferent()
diff --git a/plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php b/plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php
index bdd847205e..6f04416457 100644
--- a/plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php
+++ b/plugins/TwoFactorAuth/tests/Integration/Dao/TwoFaSecretRandomGeneratorTest.php
@@ -33,7 +33,7 @@ class TwoFaSecretRandomGeneratorTest extends IntegrationTestCase
public function test_generatorCode_length()
{
- $this->assertSame(16, Common::mb_strlen($this->generator->generateSecret()));
+ $this->assertSame(16, mb_strlen($this->generator->generateSecret()));
}
public function test_generatorCode_alwaysDifferent()
diff --git a/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php b/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php
index 3b466e6a04..b4ede7e6ab 100644
--- a/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php
+++ b/plugins/TwoFactorAuth/tests/Integration/TwoFactorAuthenticationTest.php
@@ -56,7 +56,7 @@ class TwoFactorAuthenticationTest extends IntegrationTestCase
public function test_generateSecret()
{
- $this->assertSame(16, Common::mb_strlen($this->twoFa->generateSecret()));
+ $this->assertSame(16, mb_strlen($this->twoFa->generateSecret()));
}
public function test_isUserRequiredToHaveTwoFactorEnabled_notByDefault()