PHP 8.5.0 or greater is required to run OpenCATS. '
. 'Found version: %s. |
',
PHP_VERSION
);
From 403d842cbaea8fa4fc0b8656f1c26b27d2bf36a8 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Sat, 30 May 2026 18:00:59 +0200
Subject: [PATCH 09/14] Fix BrowserKit client signature for Symfony 8
---
src/OpenCATS/Tests/Behat/BrowserKit/StreamHttpBrowser.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/OpenCATS/Tests/Behat/BrowserKit/StreamHttpBrowser.php b/src/OpenCATS/Tests/Behat/BrowserKit/StreamHttpBrowser.php
index a6a3d12bc..3a80f0998 100644
--- a/src/OpenCATS/Tests/Behat/BrowserKit/StreamHttpBrowser.php
+++ b/src/OpenCATS/Tests/Behat/BrowserKit/StreamHttpBrowser.php
@@ -13,7 +13,7 @@ public function __construct(array $serverParameters = array())
parent::__construct($serverParameters);
}
- protected function doRequest($request)
+ protected function doRequest(object $request): object
{
if (!$request instanceof Request) {
throw new \InvalidArgumentException('Unsupported request object.');
From 0feca7be2ffd9b96d310cee12429ec4e4816e327 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Mon, 1 Jun 2026 13:55:25 +0200
Subject: [PATCH 10/14] Update database compatibility for PHP 8.5
---
lib/DatabaseConnection.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/DatabaseConnection.php b/lib/DatabaseConnection.php
index 054a3ae4b..5a4b8c25c 100755
--- a/lib/DatabaseConnection.php
+++ b/lib/DatabaseConnection.php
@@ -483,6 +483,7 @@ public function escapeString($string)
// user input. For instance see:
// https://johnroach.info/2011/02/17/why-mysql_real_escape_string-isnt-enough-to-stop-sql-injection-attacks/
// To be replaced with Symfony's stack
+ $string = (string) $string;
return mysqli_real_escape_string($this->_connection, $string);
}
From 20c3eb4b3a39139bcdf8d6f7c79286abdcd87c02 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Mon, 1 Jun 2026 13:55:26 +0200
Subject: [PATCH 11/14] Fix PHP 8.5 deprecations in Behat tests
---
test/features/bootstrap/FeatureContext.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/test/features/bootstrap/FeatureContext.php b/test/features/bootstrap/FeatureContext.php
index 419ebde81..9562d98ee 100644
--- a/test/features/bootstrap/FeatureContext.php
+++ b/test/features/bootstrap/FeatureContext.php
@@ -191,7 +191,6 @@ protected function getWsendUser()
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$wsendUser = curl_exec($curl);
- curl_close($curl);
return $wsendUser;
}
From 17153083a24e8be89634c52896341da1e512650d Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Mon, 1 Jun 2026 13:13:10 +0200
Subject: [PATCH 12/14] Fix PHP 8.5 deprecation casts in core libs
---
lib/CATSUtility.php | 2 +-
lib/DatabaseConnection.php | 4 ++--
lib/License.php | 4 ++--
lib/Session.php | 2 +-
lib/Users.php | 8 ++++----
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/lib/CATSUtility.php b/lib/CATSUtility.php
index cfa53aa9d..6f2d3aa55 100755
--- a/lib/CATSUtility.php
+++ b/lib/CATSUtility.php
@@ -127,7 +127,7 @@ public static function getBuild()
$data = substr($data, strpos($data, "dir\n") + 4);
$data = substr($data, 0, strpos($data, "\n"));
- return (integer) $data;
+ return (int) $data;
}
}
diff --git a/lib/DatabaseConnection.php b/lib/DatabaseConnection.php
index 5a4b8c25c..689d003d1 100755
--- a/lib/DatabaseConnection.php
+++ b/lib/DatabaseConnection.php
@@ -533,7 +533,7 @@ public function makeQueryIntegerOrNULL($value)
return 'NULL';
}
- return (integer) $value;
+ return (int) $value;
}
/**
@@ -546,7 +546,7 @@ public function makeQueryIntegerOrNULL($value)
*/
public function makeQueryInteger($value)
{
- return (integer) $value;
+ return (int) $value;
}
/**
diff --git a/lib/License.php b/lib/License.php
index fda5df807..a22f22def 100755
--- a/lib/License.php
+++ b/lib/License.php
@@ -82,7 +82,7 @@ public function setExpirationDate($value)
return true;
}
- $this->_expirationDate = (integer) $value;
+ $this->_expirationDate = (int) $value;
return true;
}
@@ -305,7 +305,7 @@ protected function checkBit($byte, $sw)
// FIXME: Document me!
protected function scrambleByteString($byteString, $scramble)
{
- $bit = (integer) $scramble[0];
+ $bit = (int) $scramble[0];
for ($i = 0; $i < LICENSE_STRING_SIZE; $i++)
{
diff --git a/lib/Session.php b/lib/Session.php
index afeb3cef6..3b0a89131 100755
--- a/lib/Session.php
+++ b/lib/Session.php
@@ -820,7 +820,7 @@ public function processLogin($username, $password, $addToHistory = true)
$this->_userLicenses = $rs['userLicenses'];
$this->_accessLevel = $rs['accessLevel'];
$this->_realAccessLevel = $rs['accessLevel'];
- $this->_categories = explode(',', $rs['categories']);
+ $this->_categories = explode(',', (string) $rs['categories']);
$this->_isASP = ($rs['companyID'] != 0 ? true : false);
$this->_isHrMode = ($rs['isHrMode'] != 0 ? true : false);
$this->_siteCompanyID = ($rs['companyID'] != 0 ? $rs['companyID'] : -1);
diff --git a/lib/Users.php b/lib/Users.php
index 5420b02c3..77133a4e7 100644
--- a/lib/Users.php
+++ b/lib/Users.php
@@ -189,7 +189,7 @@ public function update($userID, $lastName, $firstName, $email,
$this->_siteID
);
- return (boolean) $this->_db->query($sql);
+ return (bool) $this->_db->query($sql);
}
/**
@@ -215,7 +215,7 @@ public function updateSelfEmail($userID, $email)
$this->_siteID
);
- return (boolean) $this->_db->query($sql);
+ return (bool) $this->_db->query($sql);
}
/**
@@ -241,7 +241,7 @@ public function updateCategories($userID, $categories)
$this->_siteID
);
- return (boolean) $this->_db->query($sql);
+ return (bool) $this->_db->query($sql);
}
/**
@@ -438,7 +438,7 @@ public function updateForAdministration($userID, $firstName, $lastName, $email,
$aspSiteRule
);
- return (boolean) $this->_db->query($sql);
+ return (bool) $this->_db->query($sql);
}
/**
From 56f4b7e773d13d4a9e02cfb7898d6bda256183c8 Mon Sep 17 00:00:00 2001
From: anonymoususer72041
<247563575+anonymoususer72041@users.noreply.github.com>
Date: Mon, 1 Jun 2026 13:55:36 +0200
Subject: [PATCH 13/14] Update legacy runtime compatibility for PHP 8.5
---
lib/MRU.php | 3 ++-
lib/ModuleUtility.php | 2 +-
lib/Template.php | 1 +
modules/settings/SettingsUI.php | 1 +
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/MRU.php b/lib/MRU.php
index 0ab989b73..99f68ea60 100755
--- a/lib/MRU.php
+++ b/lib/MRU.php
@@ -157,7 +157,8 @@ public function getFormatted()
}
return implode(
- $HTML, '