Skip to content

Commit 893ee33

Browse files
committed
* [MOD] Added autoloader registering as fallback
* [ADD] Added QR code generation library
1 parent 5f1d3c5 commit 893ee33

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

base.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,14 @@
77
'dir' => $lib
88
];
99

10+
if (!class_exists(\SP\Modules\Web\Plugins\Authenticator\Plugin::class)) {
11+
/** @var \Composer\Autoload\ClassLoader $loader */
12+
$loader = require APP_ROOT . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
13+
$loader->addPsr4($base['namespace'], $base['dir']);
14+
$loader->addClassMap([
15+
\SP\Modules\Web\Controllers\AuthenticatorController::class => $lib . DIRECTORY_SEPARATOR . 'Controllers' . DIRECTORY_SEPARATOR . 'AuthenticatorController.php',
16+
\SP\Modules\Web\Controllers\AuthenticatorLoginController::class => $lib . DIRECTORY_SEPARATOR . 'Controllers' . DIRECTORY_SEPARATOR . 'AuthenticatorLoginController.php'
17+
]);
18+
}
19+
1020
return $base;

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
},
2121
"require": {
2222
"syspass/extension-installer-plugin": "*",
23-
"php": "~7.0 || ~7.1 || ~7.2"
23+
"php": "~7.0 || ~7.1 || ~7.2",
24+
"bacon/bacon-qr-code": "^2.0"
2425
},
2526
"extra": {
2627
"type": "web"

0 commit comments

Comments
 (0)