From c8a5474319d0cea4f262d0d22a7a8f5df225260c Mon Sep 17 00:00:00 2001 From: Peter Martin Date: Mon, 20 Jan 2025 14:05:13 +0100 Subject: [PATCH] [5.2] Refactored JDatabaseDriver in some params (#44750) --- .../components/com_scheduler/src/Model/TaskModel.php | 7 ++++--- installation/src/Model/DatabaseModel.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/administrator/components/com_scheduler/src/Model/TaskModel.php b/administrator/components/com_scheduler/src/Model/TaskModel.php index dbd73a825b0db..65b4ec3030149 100644 --- a/administrator/components/com_scheduler/src/Model/TaskModel.php +++ b/administrator/components/com_scheduler/src/Model/TaskModel.php @@ -27,6 +27,7 @@ use Joomla\Component\Scheduler\Administrator\Helper\SchedulerHelper; use Joomla\Component\Scheduler\Administrator\Table\TaskTable; use Joomla\Component\Scheduler\Administrator\Task\TaskOption; +use Joomla\Database\DatabaseInterface; use Joomla\Database\ParameterType; use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; @@ -413,7 +414,7 @@ public function getTask(array $options = []): ?\stdClass /** * Checks if there are any running tasks in the database. * - * @param \JDatabaseDriver $db The database driver to use. + * @param DatabaseInterface $db The database driver to use. * @return bool True if there are running tasks, false otherwise. * @since 4.4.9 */ @@ -481,7 +482,7 @@ static function (TaskOption $taskOption): string { /** * Retrieves the ID of the next task based on the given criteria. * - * @param \JDatabaseDriver $db The database object. + * @param DatabaseInterface $db The database object. * @param string $now The current time. * @param array $options The options for retrieving the next task. * - includeCliExclusive: Whether to include CLI exclusive tasks. @@ -534,7 +535,7 @@ static function (TaskOption $taskOption): string { /** * Fetches a task from the database based on the current time. * - * @param \JDatabaseDriver $db The database driver to use. + * @param DatabaseInterface $db The database driver to use. * @param string $now The current time in the database's time format. * @return \stdClass|null The fetched task object, or null if no task was found. * @since 5.2.0 diff --git a/installation/src/Model/DatabaseModel.php b/installation/src/Model/DatabaseModel.php index 2b3038eeaa538..7ab5bf80d808a 100644 --- a/installation/src/Model/DatabaseModel.php +++ b/installation/src/Model/DatabaseModel.php @@ -131,7 +131,7 @@ public function createDatabase(array $options) || $type === 'pgsql' && strpos($e->getMessage(), 'database "' . $options->db_name . '" does not exist') ) { /* - * Now we're really getting insane here; we're going to try building a new JDatabaseDriver instance + * Now we're really getting insane here; we're going to try building a new DatabaseDriver instance * in order to trick the connection into creating the database */ if ($type === 'mysql') {