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

Update DbDumperFactory.php #1841

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 3 additions & 2 deletions src/Tasks/Backup/DbDumperFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public static function createFromConnection(string $dbConnectionName): DbDumper

if ($dbDumper instanceof MySql) {
$dbDumper
->setSkipSsl($dbConfig['dump']['skipSsl'] ?? false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use skip_ssl instead as the other config options use underscores, can you also add this to the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will this weekend

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, also remember to merge this spatie/db-dumper#213 if not it won't work

->setDefaultCharacterSet($dbConfig['charset'] ?? '')
->setGtidPurged($dbConfig['dump']['mysql_gtid_purged'] ?? 'AUTO');
}
Expand Down Expand Up @@ -124,7 +125,7 @@ protected static function callMethodOnDumper(DbDumper $dbDumper, string $methodN

protected static function determineValidMethodName(DbDumper $dbDumper, string $methodName): string
{
return collect([$methodName, 'set'.ucfirst($methodName)])
->first(fn (string $methodName) => method_exists($dbDumper, $methodName), '');
return collect([$methodName, 'set' . ucfirst($methodName)])
->first(fn(string $methodName) => method_exists($dbDumper, $methodName), '');
}
}