Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Refactored JDatabaseDriver in some params #44750

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion installation/src/Model/DatabaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down