File tree 2 files changed +3
-12
lines changed
2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ public static function fromArray(array $data): self
27
27
$ source = require dirname (__DIR__ , 2 ).'/config/backup.php ' ;
28
28
29
29
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 ' ] ?? [])),
32
32
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 ' ] ?? []))
34
34
);
35
35
}
36
36
}
Original file line number Diff line number Diff line change 37
37
expect ($ tempDirectory ->path ())->toBe ('/foo ' );
38
38
});
39
39
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
-
49
40
it ('merges the published config file with package config file and preserve published config values ' , function () {
50
41
config ()->set ('backup.backup.destination ' , ['compression_method ' => ZipArchive::CM_DEFLATE ]);
51
42
You can’t perform that action at this time.
0 commit comments