diff --git a/classes/DbWrapper.php b/classes/Database/DbWrapper.php similarity index 98% rename from classes/DbWrapper.php rename to classes/Database/DbWrapper.php index ca1476cef..ecc7c009b 100644 --- a/classes/DbWrapper.php +++ b/classes/Database/DbWrapper.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -namespace PrestaShop\Module\AutoUpgrade; +namespace PrestaShop\Module\AutoUpgrade\Database; use Db; use mysqli_result; diff --git a/classes/Database/MysqlErrorCode.php b/classes/Database/MysqlErrorCode.php new file mode 100644 index 000000000..3ab3ff217 --- /dev/null +++ b/classes/Database/MysqlErrorCode.php @@ -0,0 +1,13 @@ +warning_exists; + return $this->warningDetected; } - /** - * @deprecated Unused on the UIs from v7 - */ - public function setWarningExists(bool $warning_exists): self + public function setWarningDetected(bool $warningDetected): self { - $this->warning_exists = $warning_exists; + $this->warningDetected = $warningDetected; $this->save(); return $this; diff --git a/classes/Task/Update/UpdateComplete.php b/classes/Task/Update/UpdateComplete.php index 4a16b9274..eb509781a 100644 --- a/classes/Task/Update/UpdateComplete.php +++ b/classes/Task/Update/UpdateComplete.php @@ -49,7 +49,7 @@ public function run(): int $destinationVersion = $state->getDestinationVersion(); - $this->logger->info($state->getWarningExists() ? + $this->logger->info($state->isWarningDetected() ? $this->translator->trans('Shop updated to %s, but some warnings have been found.', [$destinationVersion]) : $this->translator->trans('Shop updated to %s. Congratulations! You can now reactivate your shop.', [$destinationVersion]) ); diff --git a/classes/Task/Update/UpdateModules.php b/classes/Task/Update/UpdateModules.php index 9be595551..c33d55645 100644 --- a/classes/Task/Update/UpdateModules.php +++ b/classes/Task/Update/UpdateModules.php @@ -170,6 +170,7 @@ private function handleException(UpgradeException $e): void } if ($e->getSeverity() === UpgradeException::SEVERITY_WARNING) { $this->logger->warning($e->getMessage()); + $this->container->getUpdateState()->setWarningDetected(true); } foreach ($e->getQuickInfos() as $log) { diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php index ab8b99b22..85b0be49c 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php @@ -26,6 +26,7 @@ use InvalidArgumentException; use Language; use ParseError; +use PrestaShop\Module\AutoUpgrade\Database\MysqlErrorCode; use PrestaShop\Module\AutoUpgrade\Exceptions\UpdateDatabaseException; use PrestaShop\Module\AutoUpgrade\Exceptions\UpgradeException; use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; @@ -140,7 +141,7 @@ public function finalizeCoreUpdate(): void $this->runCoreCacheClean(); - if ($this->container->getUpdateState()->getWarningExists()) { + if ($this->container->getUpdateState()->isWarningDetected()) { $this->logger->warning($this->container->getTranslator()->trans('Warning detected during update.')); } else { $this->logger->info($this->container->getTranslator()->trans('Database update completed')); @@ -456,20 +457,20 @@ private function hasPhpError($phpRes): bool private function logPhpError(string $upgrade_file, string $query, string $message): void { - $this->logger->error('PHP ' . $upgrade_file . ' ' . $query . ": \n" . $message); - $this->container->getUpdateState()->setWarningExists(true); + $this->logger->warning('PHP ' . $upgrade_file . ' ' . $query . ": \n" . $message); + $this->container->getUpdateState()->setWarningDetected(true); } private function logMissingFileError(string $path, string $func_name, string $query): void { - $this->logger->error($path . strtolower($func_name) . ' PHP - missing file ' . $query); - $this->container->getUpdateState()->setWarningExists(true); + $this->logger->warning($this->container->getTranslator()->trans('%s PHP - missing file %s', [$path . strtolower($func_name), $query])); + $this->container->getUpdateState()->setWarningDetected(true); } private function logForbiddenObjectMethodError(string $phpString, string $upgrade_file): void { - $this->logger->error($upgrade_file . ' PHP - Object Method call is forbidden (' . $phpString . ')'); - $this->container->getUpdateState()->setWarningExists(true); + $this->logger->warning($this->container->getTranslator()->trans('%s PHP - Object Method call is forbidden (%s)', [$upgrade_file, $phpString])); + $this->container->getUpdateState()->setWarningDetected(true); } protected function runSqlQuery(string $upgrade_file, string $query): void @@ -494,13 +495,21 @@ protected function runSqlQuery(string $upgrade_file, string $query): void $error = $this->db->getMsgError(); $error_number = $this->db->getNumberError(); - $this->logger->warning($this->container->getTranslator()->trans('The execution of the query failed: %s, %s', [$error_number, $error])); - $this->logger->warning($this->container->getTranslator()->trans('Migration file: %s, Query: %s', [$upgrade_file, $query])); - - $duplicates = ['1050', '1054', '1060', '1061', '1062', '1091']; + $duplicates = [ + MysqlErrorCode::TABLE_ALREADY_EXISTS, + MysqlErrorCode::UNKNOWN_COLUMN_IN_FIELD_LIST, + MysqlErrorCode::DUPLICATE_COLUMN_NAME, + MysqlErrorCode::DUPLICATE_KEY, + MysqlErrorCode::DUPLICATE_ENTRY, + MysqlErrorCode::CANNOT_DROP_KEY, + ]; if (!in_array($error_number, $duplicates)) { - $this->logger->error('SQL ' . $upgrade_file . ' ' . $error_number . ' in ' . $query . ': ' . $error); - $this->container->getUpdateState()->setWarningExists(true); + $this->logger->warning($this->container->getTranslator()->trans('The execution of the query failed: %s, %s', [$error_number, $error])); + $this->logger->warning($this->container->getTranslator()->trans('Migration file: %s, Query: %s', [$upgrade_file, $query])); + $this->container->getUpdateState()->setWarningDetected(true); + } else { + $this->logger->debug($this->container->getTranslator()->trans('The execution of the query failed: %s, %s. This error code can be safely ignored.', [$error_number, $error])); + $this->logger->debug($this->container->getTranslator()->trans('Migration file: %s, Query: %s', [$upgrade_file, $query])); } } @@ -808,12 +817,12 @@ protected function updateRTLFiles(): void try { $commandBus->handle($adaptThemeToTRLLanguages); } catch (CoreException $e) { - $this->logger->error(' + $this->logger->warning(' PHP Impossible to generate RTL files for theme' . $theme['name'] . "\n" . $e->getMessage() ); - $this->container->getUpdateState()->setWarningExists(true); + $this->container->getUpdateState()->setWarningDetected(true); } } } diff --git a/classes/UpgradeTools/Module/ModuleDownloader.php b/classes/UpgradeTools/Module/ModuleDownloader.php index 466423205..d8e403eaa 100644 --- a/classes/UpgradeTools/Module/ModuleDownloader.php +++ b/classes/UpgradeTools/Module/ModuleDownloader.php @@ -72,7 +72,8 @@ public function downloadModule(ModuleDownloaderContext $moduleDownloaderContext) } if (!$downloadSuccessful) { - throw (new UpgradeException('All download attempts have failed. Check your environment and try again.'))->setSeverity(UpgradeException::SEVERITY_ERROR); + $message = $this->translator->trans('All download attempts have failed. The module %s has been disabled. You can try to update it manually afterwards.', [$moduleDownloaderContext->getModuleName()]); + throw (new UpgradeException($message))->setSeverity(UpgradeException::SEVERITY_WARNING); } } diff --git a/tests/unit/State/UpdateStateTest.php b/tests/unit/State/UpdateStateTest.php index 4f7b5318b..959717e5f 100644 --- a/tests/unit/State/UpdateStateTest.php +++ b/tests/unit/State/UpdateStateTest.php @@ -45,7 +45,7 @@ public function testExportOfData(): void 'currentVersion' => '1.7.8.6', 'destinationVersion' => '9.0.0', 'installedLanguagesIso' => [], - 'warning_exists' => false, + 'warningDetected' => false, 'progressPercentage' => 20, ]; diff --git a/tests/unit/UpgradeTools/Module/ModuleDownloaderTest.php b/tests/unit/UpgradeTools/Module/ModuleDownloaderTest.php index 5634a2d9e..fcd5ea0fd 100644 --- a/tests/unit/UpgradeTools/Module/ModuleDownloaderTest.php +++ b/tests/unit/UpgradeTools/Module/ModuleDownloaderTest.php @@ -121,7 +121,7 @@ public function testModuleDownloaderFails() PHP_VERSION_ID >= 80000 ? ['RecursiveDirectoryIterator::__construct(/non-existing-folder): Failed to open directory: No such file or directory'] : ['RecursiveDirectoryIterator::__construct(/non-existing-folder): failed to open dir: No such file or directory'], ['Download of source #0 has failed.'] ); - $this->expectExceptionMessage('All download attempts have failed. Check your environment and try again.'); + $this->expectExceptionMessage('All download attempts have failed. The module mymodule has been disabled. You can try to update it manually afterwards.'); $this->moduleDownloader->downloadModule($moduleContext); } @@ -171,7 +171,7 @@ public function testDetectionOfXmlFileInDownloadedContents() ['Invalid contents from provider (Got an XML file).'], ['Download of source #0 has failed.'] ); - $this->expectExceptionMessage('All download attempts have failed. Check your environment and try again.'); + $this->expectExceptionMessage('All download attempts have failed. The module mymodule has been disabled. You can try to update it manually afterwards.'); $this->downloadService ->method('downloadWithRetry') diff --git a/upgrade/php/add_column.php b/upgrade/php/add_column.php index b36b73c3a..82a676b93 100644 --- a/upgrade/php/add_column.php +++ b/upgrade/php/add_column.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/add_hook.php b/upgrade/php/add_hook.php index 3237c03be..ad8ab40d9 100644 --- a/upgrade/php/add_hook.php +++ b/upgrade/php/add_hook.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/add_missing_unique_key_from_authorization_role.php b/upgrade/php/add_missing_unique_key_from_authorization_role.php index 27aa6c86e..78218acea 100644 --- a/upgrade/php/add_missing_unique_key_from_authorization_role.php +++ b/upgrade/php/add_missing_unique_key_from_authorization_role.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/add_new_status_stock.php b/upgrade/php/add_new_status_stock.php index 7a7149bee..50893b261 100644 --- a/upgrade/php/add_new_status_stock.php +++ b/upgrade/php/add_new_status_stock.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/add_new_tab.php b/upgrade/php/add_new_tab.php index 5fb1a1ff9..66d84e017 100644 --- a/upgrade/php/add_new_tab.php +++ b/upgrade/php/add_new_tab.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; use PrestaShopBundle\Security\Voter\PageVoter; /** diff --git a/upgrade/php/copy_tab_rights.php b/upgrade/php/copy_tab_rights.php index 667d95c76..386e723d7 100644 --- a/upgrade/php/copy_tab_rights.php +++ b/upgrade/php/copy_tab_rights.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; use PrestaShopBundle\Security\Voter\PageVoter; /** diff --git a/upgrade/php/deactivate_custom_modules.php b/upgrade/php/deactivate_custom_modules.php index a7f8c4dfa..1b9dd6c3d 100644 --- a/upgrade/php/deactivate_custom_modules.php +++ b/upgrade/php/deactivate_custom_modules.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/drop_column_if_exists.php b/upgrade/php/drop_column_if_exists.php index 2c3b27fff..efcc627e9 100644 --- a/upgrade/php/drop_column_if_exists.php +++ b/upgrade/php/drop_column_if_exists.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/execute_sql_if_table_exists.php b/upgrade/php/execute_sql_if_table_exists.php index c3dcf7b09..996999d7a 100644 --- a/upgrade/php/execute_sql_if_table_exists.php +++ b/upgrade/php/execute_sql_if_table_exists.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_1730_add_quick_access_evaluation_catalog.php b/upgrade/php/ps_1730_add_quick_access_evaluation_catalog.php index 6fced29f0..dc055078a 100644 --- a/upgrade/php/ps_1730_add_quick_access_evaluation_catalog.php +++ b/upgrade/php/ps_1730_add_quick_access_evaluation_catalog.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_1730_migrate_data_from_store_to_store_lang_and_clean_store.php b/upgrade/php/ps_1730_migrate_data_from_store_to_store_lang_and_clean_store.php index 947cd2141..f3480582a 100755 --- a/upgrade/php/ps_1730_migrate_data_from_store_to_store_lang_and_clean_store.php +++ b/upgrade/php/ps_1730_migrate_data_from_store_to_store_lang_and_clean_store.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_1740_update_module_tabs.php b/upgrade/php/ps_1740_update_module_tabs.php index 5666a16e3..88157219b 100644 --- a/upgrade/php/ps_1740_update_module_tabs.php +++ b/upgrade/php/ps_1740_update_module_tabs.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * File copied from ps_update_tabs.php and modified for only adding modules related tabs diff --git a/upgrade/php/ps_1750_update_module_tabs.php b/upgrade/php/ps_1750_update_module_tabs.php index 91646c264..d01a99c01 100644 --- a/upgrade/php/ps_1750_update_module_tabs.php +++ b/upgrade/php/ps_1750_update_module_tabs.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * File copied from ps_update_tabs.php and modified for only adding modules related tabs diff --git a/upgrade/php/ps_1751_update_module_sf_tab.php b/upgrade/php/ps_1751_update_module_sf_tab.php index 97700d5ab..e1af072ae 100644 --- a/upgrade/php/ps_1751_update_module_sf_tab.php +++ b/upgrade/php/ps_1751_update_module_sf_tab.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * File copied from ps_update_tabs.php and modified for only adding modules related tabs diff --git a/upgrade/php/ps_1760_copy_data_from_currency_to_currency_lang.php b/upgrade/php/ps_1760_copy_data_from_currency_to_currency_lang.php index f72e01bbd..b461cfe49 100755 --- a/upgrade/php/ps_1760_copy_data_from_currency_to_currency_lang.php +++ b/upgrade/php/ps_1760_copy_data_from_currency_to_currency_lang.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; use PrestaShop\PrestaShop\Adapter\SymfonyContainer; use PrestaShop\PrestaShop\Core\Localization\CLDR\LocaleRepository; diff --git a/upgrade/php/ps_1760_update_tabs.php b/upgrade/php/ps_1760_update_tabs.php index 5a09f7299..cd35205b3 100644 --- a/upgrade/php/ps_1760_update_tabs.php +++ b/upgrade/php/ps_1760_update_tabs.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * File copied from ps_1750_update_module_tabs.php and modified to add new roles diff --git a/upgrade/php/ps_1761_update_currencies.php b/upgrade/php/ps_1761_update_currencies.php index 63317586c..b4316979a 100644 --- a/upgrade/php/ps_1761_update_currencies.php +++ b/upgrade/php/ps_1761_update_currencies.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; use PrestaShop\PrestaShop\Adapter\SymfonyContainer; use PrestaShop\PrestaShop\Core\Localization\CLDR\LocaleRepository; diff --git a/upgrade/php/ps_1763_update_tabs.php b/upgrade/php/ps_1763_update_tabs.php index 1f413a98c..e02ffee23 100644 --- a/upgrade/php/ps_1763_update_tabs.php +++ b/upgrade/php/ps_1763_update_tabs.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * File copied from ps_1750_update_module_tabs.php and modified to add new roles diff --git a/upgrade/php/ps_1770_preset_tab_enabled.php b/upgrade/php/ps_1770_preset_tab_enabled.php index 7b1ff7e4a..885f21155 100644 --- a/upgrade/php/ps_1770_preset_tab_enabled.php +++ b/upgrade/php/ps_1770_preset_tab_enabled.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Preset enabled new column in tabs to true for all (except for disabled modules) diff --git a/upgrade/php/ps_1770_update_charset.php b/upgrade/php/ps_1770_update_charset.php index 55fc378bc..cdeaecd00 100644 --- a/upgrade/php/ps_1770_update_charset.php +++ b/upgrade/php/ps_1770_update_charset.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_1770_update_order_status_colors.php b/upgrade/php/ps_1770_update_order_status_colors.php index d2ac0094a..d5817ed2b 100644 --- a/upgrade/php/ps_1770_update_order_status_colors.php +++ b/upgrade/php/ps_1770_update_order_status_colors.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; use PrestaShop\PrestaShop\Core\Domain\Order\Status\OrderStatusColor; /** diff --git a/upgrade/php/ps_1771_update_customer_note.php b/upgrade/php/ps_1771_update_customer_note.php index 6d466537c..83dab7db8 100644 --- a/upgrade/php/ps_1771_update_customer_note.php +++ b/upgrade/php/ps_1771_update_customer_note.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_1780_add_feature_flag_tab.php b/upgrade/php/ps_1780_add_feature_flag_tab.php index 66291145c..293e585b2 100644 --- a/upgrade/php/ps_1780_add_feature_flag_tab.php +++ b/upgrade/php/ps_1780_add_feature_flag_tab.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_800_add_security_tab.php b/upgrade/php/ps_800_add_security_tab.php index e51e3242b..216fd2354 100644 --- a/upgrade/php/ps_800_add_security_tab.php +++ b/upgrade/php/ps_800_add_security_tab.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_810_update_product_page_feature_flags.php b/upgrade/php/ps_810_update_product_page_feature_flags.php index 3291c95b7..82cb97856 100644 --- a/upgrade/php/ps_810_update_product_page_feature_flags.php +++ b/upgrade/php/ps_810_update_product_page_feature_flags.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_811_update_redirect_type.php b/upgrade/php/ps_811_update_redirect_type.php index 51ed66132..4acfa400e 100644 --- a/upgrade/php/ps_811_update_redirect_type.php +++ b/upgrade/php/ps_811_update_redirect_type.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/ps_900_migrate_category_images.php b/upgrade/php/ps_900_migrate_category_images.php index ae72ee9dc..4c87b43f7 100644 --- a/upgrade/php/ps_900_migrate_category_images.php +++ b/upgrade/php/ps_900_migrate_category_images.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * @return void diff --git a/upgrade/php/ps_900_set_url_lang_prefix.php b/upgrade/php/ps_900_set_url_lang_prefix.php index 1c76e963a..99526ec32 100644 --- a/upgrade/php/ps_900_set_url_lang_prefix.php +++ b/upgrade/php/ps_900_set_url_lang_prefix.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * @return void diff --git a/upgrade/php/ps_remove_controller_tab.php b/upgrade/php/ps_remove_controller_tab.php index dc29b93a3..0128f8291 100644 --- a/upgrade/php/ps_remove_controller_tab.php +++ b/upgrade/php/ps_remove_controller_tab.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * @throws \PrestaShop\Module\AutoUpgrade\Exceptions\UpdateDatabaseException diff --git a/upgrade/php/ps_update_tab_lang.php b/upgrade/php/ps_update_tab_lang.php index 7e8503bbd..ae67130b1 100644 --- a/upgrade/php/ps_update_tab_lang.php +++ b/upgrade/php/ps_update_tab_lang.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Updates ps_tab_lang table for a given domain and className diff --git a/upgrade/php/ps_update_tabs.php b/upgrade/php/ps_update_tabs.php index 4503c5629..4adb3a413 100644 --- a/upgrade/php/ps_update_tabs.php +++ b/upgrade/php/ps_update_tabs.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/rename_tab.php b/upgrade/php/rename_tab.php index 3f69c4fbb..a145b6ebb 100644 --- a/upgrade/php/rename_tab.php +++ b/upgrade/php/rename_tab.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * Copyright since 2007 PrestaShop SA and Contributors diff --git a/upgrade/php/update_null_values.php b/upgrade/php/update_null_values.php index 2aceb55bb..f906e0549 100644 --- a/upgrade/php/update_null_values.php +++ b/upgrade/php/update_null_values.php @@ -18,7 +18,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ -use PrestaShop\Module\AutoUpgrade\DbWrapper; +use PrestaShop\Module\AutoUpgrade\Database\DbWrapper; /** * This function aims to update the null values of several columns, to default values,