Skip to content

Commit 2335951

Browse files
committed
php 8.3.0: Calling ldap_connect() with separate hostname and port is now deprecated.
1 parent 24a2c4f commit 2335951

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

composer.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "templatemonster/ldap-auth",
33
"description": "Yii2 module for mapping ldap to rbac.",
4-
"version": "0.3.0",
4+
"version": "0.4.0",
55
"keywords": [
66
"auth",
77
"microservice",
@@ -10,16 +10,6 @@
1010
],
1111
"type": "module",
1212
"license": "MIT",
13-
"authors": [
14-
{
15-
"name": "Andrey Vanda",
16-
"email": "[email protected]"
17-
},
18-
{
19-
"name": "Denis Horobtsov",
20-
"email": "[email protected]"
21-
}
22-
],
2313
"repositories":[
2414
{
2515
"type":"git",
@@ -28,7 +18,8 @@
2818
],
2919
"require": {
3020
"yiisoft/yii2": "*",
31-
"templatemonster/yii2-migration-aware-module" : "*"
21+
"templatemonster/yii2-migration-aware-module" : "*",
22+
"ext-ldap": "*"
3223
},
3324
"autoload": {
3425
"psr-4": {

src/ldap/wrappers/LdapWrapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class LdapWrapper
1515
*/
1616
public function __construct($host, $port)
1717
{
18-
$this->ldapConnection = ldap_connect($host, $port);
18+
$this->ldapConnection = ldap_connect('ldap://' . $host . ':' . $port);
1919
}
2020

2121
/**
@@ -47,4 +47,4 @@ public function search($filter, $dn)
4747
return ldap_get_entries($this->ldapConnection, $query);
4848
}
4949

50-
}
50+
}

0 commit comments

Comments
 (0)