Skip to content

Commit

Permalink
Upgrade pragmarx/google2fa to v4
Browse files Browse the repository at this point in the history
Add pragmarx/google2fa-qrcode v1

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
  • Loading branch information
MauricioFauth committed Oct 10, 2018
1 parent f7dfc74 commit 8a7d18d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build:
dependencies:
before:
- composer install
- composer require tecnickcom/tcpdf pragmarx/google2fa bacon/bacon-qr-code samyoul/u2f-php-server
- composer require tecnickcom/tcpdf pragmarx/google2fa-qrcode samyoul/u2f-php-server
- ./vendor/bin/phpcs --config-set installed_paths `pwd`/vendor/phpmyadmin/coding-standard
tests:
override:
Expand Down
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"conflict": {
"phpseclib/phpseclib": "2.0.8",
"tecnickcom/tcpdf": "<6.2",
"pragmarx/google2fa": "<3.0.1",
"bacon/bacon-qr-code": "<1.0",
"pragmarx/google2fa-qrcode": "<1.0",
"bacon/bacon-qr-code": "<1.0 || >=2.0",
"samyoul/u2f-php-server": "<1.1"
},
"suggest": {
Expand All @@ -75,8 +75,7 @@
"ext-gd2": "For image transformations",
"ext-mbstring": "For best performance",
"tecnickcom/tcpdf": "For PDF support",
"pragmarx/google2fa": "For 2FA authentication",
"bacon/bacon-qr-code": "For 2FA authentication",
"pragmarx/google2fa-qrcode": "For 2FA authentication",
"samyoul/u2f-php-server": "For FIDO U2F authentication"
},
"require-dev": {
Expand All @@ -85,8 +84,7 @@
"phpunit/phpunit-selenium": "^4.1",
"squizlabs/php_codesniffer": "^3.0",
"tecnickcom/tcpdf": "^6.2",
"pragmarx/google2fa": "^3.0",
"bacon/bacon-qr-code": "^1.0",
"pragmarx/google2fa-qrcode": "^1.0",
"samyoul/u2f-php-server": "^1.1",
"phpmyadmin/coding-standard": "^0.3",
"phpstan/phpstan": "^0.10.3"
Expand Down
2 changes: 1 addition & 1 deletion doc/two_factor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ manually; the typical way of doing so is with the command:

.. code-block:: sh
composer require pragmarx/google2fa bacon/bacon-qr-code
composer require pragmarx/google2fa-qrcode
Or when using a hardware security key with FIDO U2F:

Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Plugins/TwoFactor/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use PhpMyAdmin\TwoFactor;
use PhpMyAdmin\Template;
use PhpMyAdmin\Plugins\TwoFactorPlugin;
use PragmaRX\Google2FA\Google2FA;
use PragmaRX\Google2FAQRCode\Google2FA;

/**
* HOTP and TOTP based two-factor authentication
Expand Down
6 changes: 3 additions & 3 deletions libraries/classes/TwoFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function getAvailable()
if ($GLOBALS['cfg']['DBG']['simple2fa']) {
$result[] = 'simple';
}
if (class_exists('PragmaRX\Google2FA\Google2FA') && class_exists('BaconQrCode\Renderer\Image\Png')) {
if (class_exists('PragmaRX\Google2FAQRCode\Google2FA')) {
$result[] = 'application';
}
if (class_exists('Samyoul\U2F\U2FServer\U2FServer')) {
Expand All @@ -135,10 +135,10 @@ public function getAvailable()
public function getMissingDeps()
{
$result = [];
if (!class_exists('PragmaRX\Google2FA\Google2FA')) {
if (!class_exists('PragmaRX\Google2FAQRCode\Google2FA')) {
$result[] = [
'class' => \PhpMyAdmin\Plugins\TwoFactor\Application::getName(),
'dep' => 'pragmarx/google2fa',
'dep' => 'pragmarx/google2fa-qrcode',
];
}
if (!class_exists('BaconQrCode\Renderer\Image\Png')) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ if [ ! -d libraries/tcpdf ] ; then
echo "* Running composer"
composer config platform.php "$PHP_REQ"
composer update --no-dev
composer require --update-no-dev tecnickcom/tcpdf pragmarx/google2fa bacon/bacon-qr-code samyoul/u2f-php-server
composer require --update-no-dev tecnickcom/tcpdf pragmarx/google2fa-qrcode samyoul/u2f-php-server
mv composer.json.backup composer.json
echo "* Cleanup of composer packages"
rm -rf \
Expand Down

0 comments on commit 8a7d18d

Please sign in to comment.