From 543b0fbf1cad604bc1e6856f387bd7243e8662c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20V=C3=A1cha?= Date: Sun, 22 Mar 2026 18:54:39 +0100 Subject: [PATCH 1/3] Update the @param annotation of the getColumnsFromAbraFlexi method Filter conditions don't have a string key. For example here: https://github.com/Spoje-NET/php-abraflexi/blob/main/src/AbraFlexi/RO.php#L2122 --- src/AbraFlexi/RO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AbraFlexi/RO.php b/src/AbraFlexi/RO.php index b47de4e1..031ff8b3 100644 --- a/src/AbraFlexi/RO.php +++ b/src/AbraFlexi/RO.php @@ -1888,7 +1888,7 @@ public function getSumsFromAbraFlexi( * Return columns from AbraFlexi according to conditions. * * @param array|string $columnsList List of items or detail level: id|summary|full - * @param array $conditions Array of conditions or record ID + * @param array $conditions Array of conditions or record ID * @param null|string $indexBy Column by which to index records * * @return null|array> Records From 5669885c941033dd8948cfab019d8d13d3d5110b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20V=C3=A1cha?= Date: Sun, 22 Mar 2026 19:17:26 +0100 Subject: [PATCH 2/3] Drop the disconnect method of the RO class Function curl_close() is deprecated since PHP 8.5, and it has no effect since PHP 8.0. --- src/AbraFlexi/RO.php | 21 --------------------- tests/src/AbraFlexi/ROTest.php | 12 ------------ 2 files changed, 33 deletions(-) diff --git a/src/AbraFlexi/RO.php b/src/AbraFlexi/RO.php index 031ff8b3..2885f2e9 100644 --- a/src/AbraFlexi/RO.php +++ b/src/AbraFlexi/RO.php @@ -368,14 +368,6 @@ public function __construct($init = null, $options = []) $this->setObjectName(\array_key_exists('objectName', $options) ? $options['objectName'] : null); } - /** - * Disconnect CURL before pass away. - */ - public function __destruct() - { - $this->disconnect(); - } - /** * Obtain record/object identificator code: or id: * @@ -1489,24 +1481,11 @@ public function setAction(string $action) return $result; } - /** - * Disconnect from AbraFlexi. - */ - public function disconnect(): void - { - if ((null === $this->curl) === false) { - curl_close($this->curl); - } - - $this->curl = null; - } - /** * Reset Curl Connection. */ public function connectionReset(): void { - $this->disconnect(); $this->curlInit(); } diff --git a/tests/src/AbraFlexi/ROTest.php b/tests/src/AbraFlexi/ROTest.php index 79ff8dd1..ea1792c0 100644 --- a/tests/src/AbraFlexi/ROTest.php +++ b/tests/src/AbraFlexi/ROTest.php @@ -532,18 +532,6 @@ protected function tearDown(): void // } // // /** - // * @covers \AbraFlexi\RO::disconnect - // * - // * @todo Implement testdisconnect(). - // */ - // public function testdisconnect(): void - // { - // $this->assertEquals('', $this->object->disconnect()); - // // Remove the following lines when you implement this test. - // $this->markTestIncomplete('This test has not been implemented yet.'); - // } - // - // /** // * @covers \AbraFlexi\RO::connectionReset // * // * @todo Implement testconnectionReset(). From cac97ebc22f00115fb537c3dc9ab20f600cdfc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20V=C3=A1cha?= Date: Sun, 22 Mar 2026 19:49:53 +0100 Subject: [PATCH 3/3] Check the external ID key parameter before searching it in the external keys array In PHP 8.5 passing null as the key parameter for array_key_exists() is deprecated. --- src/AbraFlexi/RO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AbraFlexi/RO.php b/src/AbraFlexi/RO.php index 2885f2e9..f828ea58 100644 --- a/src/AbraFlexi/RO.php +++ b/src/AbraFlexi/RO.php @@ -2137,7 +2137,7 @@ public function getExternalID($want = null) { $ids = (array) $this->getExternalIDs(); - return \array_key_exists($want, $ids) ? $ids[$want] : current($ids); + return $want !== null && \array_key_exists($want, $ids) ? $ids[$want] : current($ids); } /**