Skip to content

Commit 3268028

Browse files
committed
revert pr
1 parent c86a336 commit 3268028

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/Config/Config.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public static function fromArray(array $data): self
2727
$source = require dirname(__DIR__, 2).'/config/backup.php';
2828

2929
return new self(
30-
backup: BackupConfig::fromArray(array_replace_recursive($source['backup'], $data['backup'] ?? [])),
31-
notifications: NotificationsConfig::fromArray(array_replace_recursive($source['notifications'], $data['notifications'] ?? [])),
30+
backup: BackupConfig::fromArray(array_merge($source['backup'], $data['backup'] ?? [])),
31+
notifications: NotificationsConfig::fromArray(array_merge($source['notifications'], $data['notifications'] ?? [])),
3232
monitoredBackups: MonitoredBackupsConfig::fromArray($data['monitor_backups'] ?? $source['monitor_backups']),
33-
cleanup: CleanupConfig::fromArray(array_replace_recursive($source['cleanup'], $data['cleanup'] ?? []))
33+
cleanup: CleanupConfig::fromArray(array_merge($source['cleanup'], $data['cleanup'] ?? []))
3434
);
3535
}
3636
}

tests/Config/ConfigTest.php

-9
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@
3737
expect($tempDirectory->path())->toBe('/foo');
3838
});
3939

40-
it('merges the published config file with package config file', function () {
41-
config()->set('backup.backup.destination', []);
42-
43-
$config = Config::fromArray(config('backup'));
44-
45-
expect($config->backup->destination)->toBeInstanceOf(DestinationConfig::class);
46-
expect($config->backup->destination->compressionMethod)->toBe(ZipArchive::CM_DEFAULT);
47-
});
48-
4940
it('merges the published config file with package config file and preserve published config values', function () {
5041
config()->set('backup.backup.destination', ['compression_method' => ZipArchive::CM_DEFLATE]);
5142

0 commit comments

Comments
 (0)