From 727999c3ab627fb9b7c6dc82fd71099d164000e7 Mon Sep 17 00:00:00 2001 From: morgan Date: Wed, 29 Jan 2025 18:17:42 +0100 Subject: [PATCH] Remove previous backup config --- classes/Analytics.php | 1 - classes/Parameters/UpgradeConfiguration.php | 8 -------- tests/unit/AnalyticsTest.php | 2 -- 3 files changed, 11 deletions(-) diff --git a/classes/Analytics.php b/classes/Analytics.php index 3a5bce11a..88650e778 100644 --- a/classes/Analytics.php +++ b/classes/Analytics.php @@ -114,7 +114,6 @@ public function getProperties($type): array switch ($type) { case self::WITH_BACKUP_PROPERTIES: $additionalProperties = [ - 'backup_files_and_databases' => $this->updateConfiguration->shouldBackupFilesAndDatabase(), 'backup_images' => $this->updateConfiguration->shouldBackupImages(), ]; $upgradeProperties = $this->properties[self::WITH_BACKUP_PROPERTIES] ?? []; diff --git a/classes/Parameters/UpgradeConfiguration.php b/classes/Parameters/UpgradeConfiguration.php index f046b3c78..11417dd4c 100644 --- a/classes/Parameters/UpgradeConfiguration.php +++ b/classes/Parameters/UpgradeConfiguration.php @@ -42,7 +42,6 @@ class UpgradeConfiguration extends ArrayCollection const PS_AUTOUP_CUSTOM_MOD_DESACT = 'PS_AUTOUP_CUSTOM_MOD_DESACT'; const PS_AUTOUP_CHANGE_DEFAULT_THEME = 'PS_AUTOUP_CHANGE_DEFAULT_THEME'; const PS_AUTOUP_REGEN_EMAIL = 'PS_AUTOUP_REGEN_EMAIL'; - const PS_AUTOUP_BACKUP = 'PS_AUTOUP_BACKUP'; const PS_AUTOUP_KEEP_IMAGES = 'PS_AUTOUP_KEEP_IMAGES'; const PS_DISABLE_OVERRIDES = 'PS_DISABLE_OVERRIDES'; const CHANNEL = 'channel'; @@ -59,7 +58,6 @@ class UpgradeConfiguration extends ArrayCollection self::PS_AUTOUP_CUSTOM_MOD_DESACT, self::PS_AUTOUP_CHANGE_DEFAULT_THEME, self::PS_AUTOUP_REGEN_EMAIL, - self::PS_AUTOUP_BACKUP, self::PS_AUTOUP_KEEP_IMAGES, self::PS_DISABLE_OVERRIDES, self::CHANNEL, @@ -72,7 +70,6 @@ class UpgradeConfiguration extends ArrayCollection self::PS_AUTOUP_CUSTOM_MOD_DESACT => true, self::PS_AUTOUP_CHANGE_DEFAULT_THEME => false, self::PS_AUTOUP_REGEN_EMAIL => true, - self::PS_AUTOUP_BACKUP => true, self::PS_AUTOUP_KEEP_IMAGES => true, self::BACKUP_COMPLETED => false, ]; @@ -199,11 +196,6 @@ public function getMaxFileToBackup(): int return $this::PERFORMANCE_VALUES['maxBackupFileSize']; } - public function shouldBackupFilesAndDatabase(): bool - { - return $this->computeBooleanConfiguration(self::PS_AUTOUP_BACKUP); - } - /** * @return bool True if the autoupgrade module backup should include the images */ diff --git a/tests/unit/AnalyticsTest.php b/tests/unit/AnalyticsTest.php index 41adf97d7..b99c7b9da 100644 --- a/tests/unit/AnalyticsTest.php +++ b/tests/unit/AnalyticsTest.php @@ -61,7 +61,6 @@ public function testProperties() UpgradeConfiguration::PS_AUTOUP_CUSTOM_MOD_DESACT => false, UpgradeConfiguration::PS_AUTOUP_CHANGE_DEFAULT_THEME => true, UpgradeConfiguration::PS_AUTOUP_REGEN_EMAIL => true, - UpgradeConfiguration::PS_AUTOUP_BACKUP => true, UpgradeConfiguration::PS_AUTOUP_KEEP_IMAGES => false, UpgradeConfiguration::CHANNEL => UpgradeConfiguration::CHANNEL_LOCAL, UpgradeConfiguration::ARCHIVE_ZIP => 'zip.zip', @@ -131,7 +130,6 @@ public function testProperties() 'autoupgrade_version' => '9.8.7', 'module' => 'autoupgrade', - 'backup_files_and_databases' => true, 'backup_images' => false, ], ],