Skip to content

Commit 1e2822d

Browse files
committed
Fix Errors during Testing
1 parent 0b74f72 commit 1e2822d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Commands/Create.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function handle()
3636
}
3737

3838
$extraOptions = $this->option('extraOptions') ?: config('db-snapshots.extraOptions', []);
39-
$extraOptions = is_string($extraOptions) ? explode(',', $exclude) : $exclude;
39+
$extraOptions = is_string($extraOptions) ? explode(',', $extraOptions) : $extraOptions;
4040

4141

4242
$snapshot = app(SnapshotFactory::class)->create(

src/Events/CreatingSnapshot.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public function __construct(
1111
public FilesystemAdapter $disk,
1212
public string $connectionName,
1313
public ?array $tables = null,
14-
public ?array $exclude = null
14+
public ?array $exclude = null,
15+
public ?array $extraOptions = null
1516
) {
1617
//
1718
}

src/SnapshotFactory.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ public function create(string $snapshotName, string $diskName, string $connectio
3636
$disk,
3737
$connectionName,
3838
$tables,
39-
$exclude
39+
$exclude,
40+
$extraOptions
4041
));
4142

42-
$this->createDump($connectionName, $fileName, $disk, $compress, $tables, $exclude);
43+
$this->createDump($connectionName, $fileName, $disk, $compress, $tables, $exclude, $extraOptions);
4344

4445
$snapshot = new Snapshot($disk, $fileName);
4546

@@ -64,7 +65,7 @@ protected function getDbDumper(string $connectionName): DbDumper
6465
return $factory::createForConnection($connectionName);
6566
}
6667

67-
protected function createDump(string $connectionName, string $fileName, FilesystemAdapter $disk, bool $compress = false, ?array $tables = null, ?array $exclude = null): void
68+
protected function createDump(string $connectionName, string $fileName, FilesystemAdapter $disk, bool $compress = false, ?array $tables = null, ?array $exclude = null, array $extraOptions = []): void
6869
{
6970
$directory = (new TemporaryDirectory(config('db-snapshots.temporary_directory_path')))->create();
7071

0 commit comments

Comments
 (0)