Replace Zend LDAP

This commit is contained in:
Lucas Bartholemy 2020-10-14 15:07:09 +02:00
parent aa8bebea33
commit a9a5e8f9ba
7 changed files with 1921 additions and 1176 deletions

View File

@ -13,7 +13,7 @@
},
"minimum-stability": "stable",
"require": {
"php": ">=7.0.0",
"php": ">=7.1",
"ext-exif": "*",
"ext-zip": "*",
"cebe/markdown": "1.0.2",
@ -22,6 +22,8 @@
"firebase/php-jwt": "^5.0",
"jbroadway/urlify": "^1.0",
"kartik-v/yii2-widgets": "*",
"laminas/laminas-escaper": "^2.6",
"laminas/laminas-ldap": "^2.10",
"mistic100/randomcolor": "^1.0",
"npm-asset/animate.css": "*",
"npm-asset/at.js": "^1.5.1",
@ -60,9 +62,9 @@
"yiisoft/yii2-jui": "~2.0.0",
"yiisoft/yii2-queue": "~2.3.0",
"yiisoft/yii2-redis": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"zendframework/zend-http": "*",
"zendframework/zend-ldap": "^2.5"
"yiisoft/yii2-swiftmailer": "~2.0.0"
},
"replace": {
},
"require-dev": {
"codeception/codeception": "^4.0",
@ -86,9 +88,6 @@
],
"config": {
"process-timeout": 1800,
"platform": {
"php": "7.0"
},
"vendor-dir": "protected/vendor",
"sort-packages": true,
"fxp-asset": {

3054
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -23,10 +23,10 @@ use Yii;
use yii\db\Expression;
use yii\helpers\ArrayHelper;
use yii\helpers\VarDumper;
use Zend\Ldap\Exception\LdapException;
use Zend\Ldap\Ldap;
use Laminas\Ldap\Exception\LdapException;
use Laminas\Ldap\Ldap;
use humhub\modules\ldap\components\ZendLdap;
use Zend\Ldap\Node;
use Laminas\Ldap\Node;
/**
* LDAP Authentication
@ -438,7 +438,7 @@ class LdapAuth extends BaseFormAuth implements AutoSyncUsers, SyncAttributes, Ap
/**
* Sets an Zend LDAP Instance
*
* @param \Zend\Ldap\Ldap $ldap
* @param \Laminas\Ldap\Ldap $ldap
*/
public function setLdap(Ldap $ldap)
{
@ -519,7 +519,7 @@ class LdapAuth extends BaseFormAuth implements AutoSyncUsers, SyncAttributes, Ap
}
}
}
} catch (\Zend\Ldap\Exception\LdapException $ex) {
} catch (\Laminas\Ldap\Exception\LdapException $ex) {
Yii::error('Could not connect to LDAP instance: ' . $ex->getMessage(), 'ldap');
} catch (\Exception $ex) {
Yii::error('An error occurred while user sync: ' . $ex->getMessage(), 'ldap');

View File

@ -17,7 +17,7 @@ use yii\console\ExitCode;
use yii\console\widgets\Table;
use yii\db\Expression;
use yii\helpers\Console;
use Zend\Ldap\Ldap;
use Laminas\Ldap\Ldap;
/**
* Console tools for manage Ldap

View File

@ -4,13 +4,13 @@
namespace humhub\modules\ldap\components;
use Zend\Ldap\Ldap;
use Zend\Ldap\Filter;
use Zend\Ldap\Dn;
use Zend\Ldap\Exception;
use Zend\Ldap\Exception\LdapException;
use Laminas\Ldap\Ldap;
use Laminas\Ldap\Filter;
use Laminas\Ldap\Dn;
use Laminas\Ldap\Exception;
use Laminas\Ldap\Exception\LdapException;
use Traversable;
use Zend\Ldap\ErrorHandler;
use Laminas\Ldap\ErrorHandler;
class ZendLdap extends Ldap

View File

@ -14,8 +14,8 @@ use humhub\modules\admin\components\Controller;
use humhub\modules\ldap\models\LdapSettings;
use humhub\modules\user\authclient\LdapAuth;
use Yii;
use Zend\Ldap\Exception\LdapException;
use Zend\Ldap\Ldap;
use Laminas\Ldap\Exception\LdapException;
use Laminas\Ldap\Ldap;
/**

View File

@ -26,7 +26,7 @@ class LdapHelper
*/
public static function isLdapAvailable()
{
if (!class_exists('Zend\Ldap\Ldap')) {
if (!class_exists('Laminas\Ldap\Ldap')) {
return false;
}