diff -Nru php-net-ldap3-1.1.3/debian/changelog php-net-ldap3-1.1.4/debian/changelog --- php-net-ldap3-1.1.3/debian/changelog 2021-01-05 08:42:08.000000000 +0000 +++ php-net-ldap3-1.1.4/debian/changelog 2021-11-18 16:52:25.000000000 +0000 @@ -1,3 +1,11 @@ +php-net-ldap3 (1.1.4-1) unstable; urgency=medium + + * New upstream release with PHP 8.1 compatibility. + * Refresh patches. + * Bump Standards-Version to 4.6.0 (no change necessary). + + -- Guilhem Moulin Thu, 18 Nov 2021 17:52:25 +0100 + php-net-ldap3 (1.1.3-3) unstable; urgency=medium * Add d/salsa-ci.yml file for GitLab CI. diff -Nru php-net-ldap3-1.1.3/debian/control php-net-ldap3-1.1.4/debian/control --- php-net-ldap3-1.1.3/debian/control 2021-01-05 08:42:08.000000000 +0000 +++ php-net-ldap3-1.1.4/debian/control 2021-11-18 16:52:25.000000000 +0000 @@ -5,7 +5,7 @@ Uploaders: Vincent Bernat , Guilhem Moulin Build-Depends: debhelper-compat (= 13), pkg-php-tools (>= 1.7~) -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Vcs-Git: https://salsa.debian.org/php-team/pear/php-net-ldap3.git Vcs-Browser: https://salsa.debian.org/php-team/pear/php-net-ldap3 Homepage: https://git.kolab.org/diffusion/PNL/ diff -Nru php-net-ldap3-1.1.3/debian/patches/update-composer.patch php-net-ldap3-1.1.4/debian/patches/update-composer.patch --- php-net-ldap3-1.1.3/debian/patches/update-composer.patch 2021-01-05 08:42:08.000000000 +0000 +++ php-net-ldap3-1.1.4/debian/patches/update-composer.patch 2021-11-18 16:52:25.000000000 +0000 @@ -1,17 +1,19 @@ -Author: Guilhem Moulin -Date: Sun Dec 13 21:03:34 2020 +0100 +From: Guilhem Moulin +Date: Sun, 13 Dec 2020 21:03:34 +0100 +Subject: Update PHP pear dependencies + Forwarded: not-needed -Description: Update PHP pear dependencies - Restore pear-pear/ prefix to create proper package dependencies. - Revert "Use packagist as a source of Net_LDAP2 package" - - This reverts commit 51afe33906e1c9f5cf0811271b29b08c615c95ce. +Restore pear-pear/ prefix to create proper package dependencies. +This reverts commit 51afe33906e1c9f5cf0811271b29b08c615c95ce "Use +packagist as a source of Net_LDAP2 package". --- - composer.json | 8 +++++++- + composer.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) +diff --git a/composer.json b/composer.json +index 35b2f3b..4a887a3 100644 --- a/composer.json +++ b/composer.json @@ -22,9 +22,15 @@ diff -Nru php-net-ldap3-1.1.3/lib/Net/LDAP3/Result.php php-net-ldap3-1.1.4/lib/Net/LDAP3/Result.php --- php-net-ldap3-1.1.3/lib/Net/LDAP3/Result.php 2019-10-21 11:18:59.000000000 +0000 +++ php-net-ldap3-1.1.4/lib/Net/LDAP3/Result.php 2021-11-11 09:02:56.000000000 +0000 @@ -147,6 +147,7 @@ /*** Implement PHP 5 Iterator interface to make foreach work ***/ + #[ReturnTypeWillChange] function current() { $attrib = ldap_get_attributes($this->conn, $this->current); @@ -155,25 +156,29 @@ return $attrib; } + #[ReturnTypeWillChange] function key() { return $this->iteratorkey; } + #[ReturnTypeWillChange] function rewind() { $this->iteratorkey = 0; $this->current = ldap_first_entry($this->conn, $this->result); } + #[ReturnTypeWillChange] function next() { $this->iteratorkey++; $this->current = ldap_next_entry($this->conn, $this->current); } + #[ReturnTypeWillChange] function valid() { - return (bool)$this->current; + return (bool) $this->current; } } diff -Nru php-net-ldap3-1.1.3/lib/Net/LDAP3.php php-net-ldap3-1.1.4/lib/Net/LDAP3.php --- php-net-ldap3-1.1.3/lib/Net/LDAP3.php 2019-10-21 11:18:59.000000000 +0000 +++ php-net-ldap3-1.1.4/lib/Net/LDAP3.php 2021-11-11 09:02:56.000000000 +0000 @@ -600,7 +600,7 @@ return false; } - if (is_resource($this->conn)) { + if (isset($this->conn) && $this->conn !== false) { $this->_debug("Connection already exists"); return true; } @@ -644,7 +644,7 @@ $this->_debug("S: NOT OK"); } - if (!is_resource($this->conn)) { + if (!isset($this->conn) || $this->conn === false) { $this->_error("Could not connect to LDAP"); return false; } @@ -2372,7 +2372,7 @@ if (is_array($attributes['rename']) && !empty($attributes['rename'])) { $olddn = $attributes['rename']['dn']; $newrdn = $attributes['rename']['new_rdn']; - $new_parent = $attributes['rename']['new_parent']; + $new_parent = isset($attributes['rename']['new_parent']) ? $attributes['rename']['new_parent'] : null; $this->_debug("C: Rename $olddn to $newrdn,$new_parent");