diff --git a/classes/db/DAO.php b/classes/db/DAO.php index 72568a31114..8bf685c1a5b 100644 --- a/classes/db/DAO.php +++ b/classes/db/DAO.php @@ -173,21 +173,6 @@ public function update(string $sql, array $params = [], bool $callHooks = true, return DB::affectingStatement($sql, $params); } - /** - * Insert a row in a table, replacing an existing row if necessary. - * - * @param $arrFields Associative array of colName => value - * @param $keyCols Array of column names that are keys - * - * @deprecated 3.4 - */ - public function replace(string $table, array $arrFields, array $keyCols): void - { - $matchValues = array_filter($arrFields, fn ($key) => in_array($key, $keyCols), ARRAY_FILTER_USE_KEY); - $additionalValues = array_filter($arrFields, fn ($key) => !in_array($key, $keyCols), ARRAY_FILTER_USE_KEY); - DB::table($table)->updateOrInsert($matchValues, $additionalValues); - } - /** * Return the last ID inserted in an autonumbered field. */ @@ -196,16 +181,6 @@ protected function getInsertId(): int return DB::getPdo()->lastInsertId(); } - /** - * Return the last ID inserted in an autonumbered field. - * - * @deprecated 3.4 - */ - public function _getInsertId(): int - { - return $this->getInsertId(); - } - /** * Return datetime formatted for DB insertion. * @@ -370,16 +345,6 @@ public function convertToDB(mixed $value, ?string &$type = null, bool $nullable return $value; } - /** - * Cast the given parameter to an int, or leave it null. - * - * @deprecated 3.4 - */ - public function nullOrInt(mixed $value): ?int - { - return (empty($value) ? null : (int) $value); - } - /** * Get a list of additional field names to store in this DAO. * This can be used to extend the table with virtual "columns", @@ -551,20 +516,6 @@ public function getDataObjectSettings(string $tableName, string $idFieldName, in } } - /** - * Get the direction specifier for sorting from a SORT_DIRECTION_... constant. - * - * @deprecated 3.4 - */ - public function getDirectionMapping(int $direction): string - { - return match($direction) { - self::SORT_DIRECTION_ASC => 'ASC', - self::SORT_DIRECTION_DESC => 'DESC', - default => 'ASC' - }; - } - /** * Generate a JSON message with an event that can be sent * to the client to refresh itself according to changes