-
-
Notifications
You must be signed in to change notification settings - Fork 787
Open
Description
when setting skip_ssl in config/database.php
'dump' => [
'skip_ssl' => env('BACKUP_MYSQL_SKIP_SSL', false),
],
the flag is always set regardless of the actual value of skip_ssl
the override of the actual passed value happens in callMethodOnDumper of https://github.com/spatie/laravel-backup/blob/main/src/Tasks/Backup/DbDumperFactory.php since
if (! $methodValue) {
$dbDumper->$methodName();
return $dbDumper;
}
calls DbDumper->setSkipSsl() which is by default set to true
public function setSkipSsl(bool $skipSsl = true): self
{
$this->skipSsl = $skipSsl;
return $this;
}
i assume the correct implementation of this is
protected static function callMethodOnDumper(DbDumper $dbDumper, string $methodName, mixed $methodValue): DbDumper
{
if (! isset($methodValue)) {
$dbDumper->$methodName();
return $dbDumper;
}
$dbDumper->$methodName($methodValue);
return $dbDumper;
}
i will submit a PR shortly
Metadata
Metadata
Assignees
Labels
No labels