Skip to content

Commit

Permalink
compatibility with php-7.4 + add minimal version requirements for php…
Browse files Browse the repository at this point in the history
…unit/mockery
  • Loading branch information
David Coutadeur committed Apr 24, 2024
1 parent b9e97e8 commit bd4259e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"phpmailer/phpmailer": "^6.5.0"
},
"require-dev": {
"phpunit/phpunit": "*",
"mockery/mockery": "*"
"phpunit/phpunit": ">=8",
"mockery/mockery": ">=1.4"
}
}
1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<directory suffix="Test.php">tests/Ltb</directory>
</testsuite>
</testsuites>
<logging/>
<source>
<include>
<directory suffix=".php">src</directory>
Expand Down
2 changes: 1 addition & 1 deletion src/Ltb/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function sorted_search($ldap_base, $ldap_filter, $attributes, $sortby, $ldap_siz
* @param string $pwdattribute the Attribute that contains the password
* @return string|false the first value of the password taken from ldap_get_values
*/
function get_password_value($dn, $pwdattribute): string|false {
function get_password_value($dn, $pwdattribute) {
$search_userpassword = \Ltb\PhpLDAP::ldap_read($this->ldap, $dn, "(objectClass=*)", array($pwdattribute));
if ($search_userpassword) {
$password_values = \Ltb\PhpLDAP::ldap_get_values($this->ldap, \Ltb\PhpLDAP::ldap_first_entry($this->ldap, $search_userpassword), $pwdattribute);
Expand Down

0 comments on commit bd4259e

Please sign in to comment.