From 894f28a45bed1bce1f81de2708bad498cc09768d Mon Sep 17 00:00:00 2001 From: Robert Deutz Date: Mon, 6 Oct 2025 14:49:59 +0200 Subject: [PATCH 1/2] deprecated class attribute --- src/DatabaseDriver.php | 2 ++ src/DatabaseIterator.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DatabaseDriver.php b/src/DatabaseDriver.php index 81885d02..ede11043 100644 --- a/src/DatabaseDriver.php +++ b/src/DatabaseDriver.php @@ -1228,6 +1228,7 @@ public function loadColumn($offset = 0) * Method to get the first row of the result set from the database query as an object. * * @param string $class The class name to use for the returned row object. + * The $class parameter is deprecated in 4.x and will be removed in 6.0 without a replacement. * * @return mixed The return value or null if the query failed. * @@ -1275,6 +1276,7 @@ public function loadObject($class = \stdClass::class) * * @param string $key The name of a field on which to key the result array. * @param string $class The class name to use for the returned row objects. + * The $class parameter is deprecated in 4.x and will be removed in 6.0 without a replacement. * * @return mixed The return value or null if the query failed. * diff --git a/src/DatabaseIterator.php b/src/DatabaseIterator.php index 447c3bb9..8e9d33e1 100644 --- a/src/DatabaseIterator.php +++ b/src/DatabaseIterator.php @@ -70,9 +70,11 @@ class DatabaseIterator implements \Countable, \Iterator * @param StatementInterface $statement The statement holding the result set to iterate. * @param string $column An option column to use as the iterator key. * @param string $class The class of object that is returned. + * The $class parameter is deprecated in 4.x and will be removed in 6.0 + * without a replacement. * - * @since 1.0 * @throws \InvalidArgumentException + *@since 1.0 */ public function __construct(StatementInterface $statement, $column = null, $class = \stdClass::class) { From d999aee35c24a026bfacb72e15a9957ba9289e88 Mon Sep 17 00:00:00 2001 From: Robert Deutz Date: Mon, 6 Oct 2025 15:07:14 +0200 Subject: [PATCH 2/2] Update src/DatabaseIterator.php Co-authored-by: Richard Fath --- src/DatabaseIterator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DatabaseIterator.php b/src/DatabaseIterator.php index 8e9d33e1..4294432b 100644 --- a/src/DatabaseIterator.php +++ b/src/DatabaseIterator.php @@ -74,7 +74,7 @@ class DatabaseIterator implements \Countable, \Iterator * without a replacement. * * @throws \InvalidArgumentException - *@since 1.0 + * @since 1.0 */ public function __construct(StatementInterface $statement, $column = null, $class = \stdClass::class) {