Skip to content

Commit 19008bd

Browse files
committed
Fix for deprecated helpers
1 parent 13a47f0 commit 19008bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DbDumperFactory.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Spatie\DbSnapshots;
44

5+
use Illuminate\Support\Arr;
6+
use Illuminate\Support\Str;
57
use Spatie\DbDumper\DbDumper;
68
use Spatie\DbDumper\Databases\MySql;
79
use Spatie\DbDumper\Databases\Sqlite;
@@ -18,7 +20,7 @@ public static function createForConnection(string $connectionName): DbDumper
1820
throw CannotCreateDbDumper::connectionDoesNotExist($connectionName);
1921
}
2022

21-
$dbHost = array_get($dbConfig, 'read.host', array_get($dbConfig, 'host'));
23+
$dbHost = Arr::get($dbConfig, 'read.host', Arr::get($dbConfig, 'host'));
2224

2325
$dbDumper = static::forDriver($dbConfig['driver'])
2426
->setHost($dbHost ?? '')
@@ -66,7 +68,7 @@ protected static function forDriver($dbDriver): DbDumper
6668
protected static function processExtraDumpParameters(array $dumpConfiguration, $dbDumper): DbDumper
6769
{
6870
collect($dumpConfiguration)->each(function ($configValue, $configName) use ($dbDumper) {
69-
$methodName = lcfirst(studly_case(is_numeric($configName) ? $configValue : $configName));
71+
$methodName = lcfirst(Str::studly(is_numeric($configName) ? $configValue : $configName));
7072
$methodValue = is_numeric($configName) ? null : $configValue;
7173

7274
$methodName = static::determineValidMethodName($dbDumper, $methodName);

0 commit comments

Comments
 (0)