From 78f853bd3cf6b4c716055bc5b02ae07b6a7e414a Mon Sep 17 00:00:00 2001 From: RahatHameed Date: Fri, 8 Nov 2024 13:13:42 +0100 Subject: [PATCH 1/2] OXDEV-7847 Set the default value of blSkipDebitOldBankInfo to true --- CHANGELOG-7.3.md | 5 ++++- source/Internal/Setup/Database/Sql/initial_data.sql | 3 ++- tests/Integration/Legacy/Core/InputValidatorTest.php | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG-7.3.md b/CHANGELOG-7.3.md index 873a440e86..5b86dd57c2 100644 --- a/CHANGELOG-7.3.md +++ b/CHANGELOG-7.3.md @@ -9,4 +9,7 @@ - Shop ID resolution considers SSL language URLs ### Removed -- PHPUnit v10 support \ No newline at end of file +- PHPUnit v10 support + +### Changed +- Set the default value of blSkipDebitOldBankInfo to true diff --git a/source/Internal/Setup/Database/Sql/initial_data.sql b/source/Internal/Setup/Database/Sql/initial_data.sql index 71bd378cd6..a25b09834e 100644 --- a/source/Internal/Setup/Database/Sql/initial_data.sql +++ b/source/Internal/Setup/Database/Sql/initial_data.sql @@ -133,7 +133,8 @@ INSERT INTO `oxconfig` (`OXID`, `OXSHOPID`, `OXMODULE`, `OXVARNAME`, `OXVARTYPE` ('mla50c74dd79703312ffb8cfd82c3741', 1, '', 'aLanguageURLs', 'arr', 'a:2:{i:0;s:0:\"\";i:1;N;}'), ('mlabefd7ebdb5946e8f3f7e7a953b323', 1, '', 'aLanguageSSLURLs', 'arr', 'a:2:{i:0;s:0:\"\";i:1;N;}'), ('mlae44cdad808d9b994c58540db39e7a', 1, '', 'aLanguages', 'aarr', 'a:2:{s:2:\"de\";s:7:\"Deutsch\";s:2:\"en\";s:7:\"English\";}'), -('omc4555952125c3c2.98253113', 1, '', 'blDisableNavBars', 'bool', '1'); +('omc4555952125c3c2.98253113', 1, '', 'blDisableNavBars', 'bool', '1'), +('feb42aecdf7bacc7c76c9d36102da622', 1, '', 'blSkipDebitOldBankInfo', 'bool', '1'); INSERT INTO `oxcontents` (`OXID`, `OXLOADID`, `OXSHOPID`, `OXSNIPPET`, `OXTYPE`, `OXACTIVE`, `OXACTIVE_1`, `OXPOSITION`, `OXTITLE`, `OXCONTENT`, `OXTITLE_1`, `OXCONTENT_1`, `OXACTIVE_2`, `OXTITLE_2`, `OXCONTENT_2`, `OXACTIVE_3`, `OXTITLE_3`, `OXCONTENT_3`, `OXCATID`, `OXFOLDER`, `OXTERMVERSION`) VALUES ('8709e45f31a86909e9f999222e80b1d0', 'oxstdfooter', 1, 1, 0, 1, 1, '', 'Standard Footer', '
OXID Online Shop - Alles rund um das Thema Wassersport, Sportbekleidung und Mode
', 'standard footer', '
OXID Online Shop - All about watersports, sportswear and fashion
', 1, '', '', 1, '', '', '30e44ab83fdee7564.23264141', '', ''), diff --git a/tests/Integration/Legacy/Core/InputValidatorTest.php b/tests/Integration/Legacy/Core/InputValidatorTest.php index 1727057e96..4dd65ef86b 100644 --- a/tests/Integration/Legacy/Core/InputValidatorTest.php +++ b/tests/Integration/Legacy/Core/InputValidatorTest.php @@ -34,8 +34,8 @@ public function testValidatePaymentInputDataWithCorrectBankCode(): void { $testValues = [ 'lsbankname' => 'Bank name', - 'lsblz' => '12345678', - 'lsktonr' => '123456', + 'lsblz' => 'DEDEDEFF', + 'lsktonr' => 'DE55200800000770876200', 'lsktoinhaber' => 'Hans Mustermann', ]; From 3aa822f311d1398b2bece2f5a3a890515c882fdc Mon Sep 17 00:00:00 2001 From: ashraf Date: Tue, 14 May 2024 16:44:50 +0200 Subject: [PATCH 2/2] OXDEV-7248 Deprecate config bootstrap parameters --- CHANGELOG-7.3.md | 11 ++++++++++ source/Core/Config.php | 6 ++++++ source/Core/Exception/ExceptionHandler.php | 8 ++----- source/Core/ShopControl.php | 8 +++++++ source/Core/ViewConfig.php | 2 ++ .../Framework/Database/ConnectionFactory.php | 21 +++++++++++++++++++ .../Database/ConnectionFactoryInterface.php | 15 +++++++++++++ .../Framework/Database/ConnectionProvider.php | 3 +++ .../Database/ConnectionProviderInterface.php | 5 +++-- .../Framework/Database/TransactionService.php | 3 +++ .../Database/TransactionServiceInterface.php | 5 +++-- .../Internal/Framework/Database/services.yaml | 14 ++++++++++++- .../Framework/FileSystem/FinderFactory.php | 3 +++ .../FileSystem/FinderFactoryInterface.php | 5 +++-- .../FileSystem/bootstrap-services.yaml | 4 ++++ .../Setup/ConfigFile/ConfigFileDao.php | 3 +++ .../ConfigFile/ConfigFileDaoInterface.php | 3 +++ .../ConfigFileNotFoundException.php | 3 +++ .../ConfigFile/FileNotEditableException.php | 3 +++ .../Transition/Utility/BasicContext.php | 7 +++++-- .../Utility/BasicContextInterface.php | 7 +++++-- .../Transition/Utility/ContextInterface.php | 2 ++ source/oxfunctions.php | 3 +++ 23 files changed, 127 insertions(+), 17 deletions(-) create mode 100644 source/Internal/Framework/Database/ConnectionFactory.php create mode 100644 source/Internal/Framework/Database/ConnectionFactoryInterface.php diff --git a/CHANGELOG-7.3.md b/CHANGELOG-7.3.md index 4f5e14c3c5..ba9c694dfd 100644 --- a/CHANGELOG-7.3.md +++ b/CHANGELOG-7.3.md @@ -14,3 +14,14 @@ ### Changed - Set the default value of blSkipDebitOldBankInfo to true + +### Deprecated +- Config parameters from [config.inc.php](https://docs.oxid-esales.com/developer/en/latest/development/modules_components_themes/project/configincphp.html) will be moved to env or container parameters +- Global functions `warningHandler(), dumpVar(), debug()` +- `ConnectionProviderInterface` will be superseded by `ConnectionFactory` in next version +- Redundant interfaces `TransactionServiceInterface, FinderFactoryInterface` +- `BasicContextInterface` methods +- The `getSslShopUrl` method will be deprecated and replaced by `getShopUrl`, which will now support SSL exclusively +- The use of SSL parameter in `getAltImageUrl` method of PictureHandler will be deleted in next major version +- Method `isEnabledAdminQueryLog()` of ContextInterface +- `handleDatabaseException` functionality diff --git a/source/Core/Config.php b/source/Core/Config.php index db5cbaca71..287e653019 100644 --- a/source/Core/Config.php +++ b/source/Core/Config.php @@ -89,6 +89,8 @@ class Config extends \OxidEsales\Eshop\Core\Base * Shops install directory * * @var string + * + * @deprecated will be removed in next major, use environment variables instead */ protected $sShopDir = null; @@ -96,6 +98,8 @@ class Config extends \OxidEsales\Eshop\Core\Base * Shops compile directory * * @var string + * + * @deprecated will be removed in next major, use environment variables instead */ protected $sCompileDir = null; @@ -869,6 +873,8 @@ public function getShopUrl($lang = null, $admin = null) /** * Returns config sSSLShopURL or sMallSSLShopURL if secondary shop * + * @deprecated since v8.0 use getShopUrl instead + * * @param int $lang language (default is null) * * @return string diff --git a/source/Core/Exception/ExceptionHandler.php b/source/Core/Exception/ExceptionHandler.php index 35a95dc35f..538dc9c169 100644 --- a/source/Core/Exception/ExceptionHandler.php +++ b/source/Core/Exception/ExceptionHandler.php @@ -68,11 +68,7 @@ public function handleUncaughtException(\Throwable $exception) } /** - * Report the exception and in case that iDebug is not set, redirect to maintenance page. - * Special methods are used here as the normal exception handling routines always need a database connection and - * this would create a loop. - * - * @param \OxidEsales\Eshop\Core\Exception\DatabaseException $exception Exception to handle + * @deprecated method will be removed in next major, use handleUncaughtException directly */ public function handleDatabaseException(\OxidEsales\Eshop\Core\Exception\DatabaseException $exception) { @@ -81,7 +77,7 @@ public function handleDatabaseException(\OxidEsales\Eshop\Core\Exception\Databas /** - * Exit the application with error status 1 + * @deprecated method will be removed in next major, use PHP function directly */ protected function exitApplication() { diff --git a/source/Core/ShopControl.php b/source/Core/ShopControl.php index 2f0a181d2d..506357607e 100644 --- a/source/Core/ShopControl.php +++ b/source/Core/ShopControl.php @@ -669,6 +669,8 @@ protected function handleCookieException($exception) } /** + * @deprecated will be removed in next major, standard execution handling will be used. + * * Handle database exceptions * There is still space for improving this as a similar exception handling for database exceptions may be done in * \OxidEsales\EshopCommunity\Core\Config::init() and the current method may not be executed @@ -735,6 +737,8 @@ protected function logException(\Exception $exception) } /** + * @deprecated will be removed in next major, standard execution handling will be used. + * * Notify the shop owner about database connection problems. * * This method forms part of the exception handling process. Any further exceptions must be caught. @@ -760,6 +764,8 @@ protected function reportDatabaseConnectionException(DatabaseConnectionException } /** + * @deprecated will be removed in next major, standard execution handling will be used. + * * Return true, if a message was already sent within a given threshold. * * This method forms part of the exception handling process. Any further exceptions must be caught. @@ -784,6 +790,8 @@ protected function messageWasSentWithinThreshold() } /** + * @deprecated will be removed in next major, standard execution handling will be used. + * * Send an offline warning to the shop owner. * Currently an email is sent to the email address configured as 'sAdminEmail' in the eShop config file. * diff --git a/source/Core/ViewConfig.php b/source/Core/ViewConfig.php index 414250b9fd..a7a73c4815 100644 --- a/source/Core/ViewConfig.php +++ b/source/Core/ViewConfig.php @@ -1100,6 +1100,8 @@ public function getBasketTimeLeft() * true if blocks javascript code be enabled in templates * * @return bool + * + * @deprecated function will be removed in next major version */ public function isTplBlocksDebugMode() { diff --git a/source/Internal/Framework/Database/ConnectionFactory.php b/source/Internal/Framework/Database/ConnectionFactory.php new file mode 100644 index 0000000000..c7cae2389d --- /dev/null +++ b/source/Internal/Framework/Database/ConnectionFactory.php @@ -0,0 +1,21 @@ +getPublicConnection(); + } +} diff --git a/source/Internal/Framework/Database/ConnectionFactoryInterface.php b/source/Internal/Framework/Database/ConnectionFactoryInterface.php new file mode 100644 index 0000000000..e439be9d3b --- /dev/null +++ b/source/Internal/Framework/Database/ConnectionFactoryInterface.php @@ -0,0 +1,15 @@ +getShopRootPath(), 'var', 'configuration', 'configurable_services.yaml'); } + /** + * @inheritDoc + */ public function getShopConfigurableServicesFilePath(int $shopId): string { return Path::join( @@ -159,7 +162,7 @@ public function getProjectConfigurationDirectory(): string } /** - * @return string + * @inheritDoc */ public function getConfigurationDirectoryPath(): string { diff --git a/source/Internal/Transition/Utility/BasicContextInterface.php b/source/Internal/Transition/Utility/BasicContextInterface.php index bebdc57c86..bcb5b83db9 100644 --- a/source/Internal/Transition/Utility/BasicContextInterface.php +++ b/source/Internal/Transition/Utility/BasicContextInterface.php @@ -24,10 +24,13 @@ public function getContainerCacheFilePath(int $shopId): string; public function getGeneratedServicesFilePath(): string; /** - * @return string + * @deprecated functionality will be superseded, method will be removed in next major */ public function getConfigurableServicesFilePath(): string; + /** + * @deprecated functionality will be superseded, method will be removed in next major + */ public function getShopConfigurableServicesFilePath(int $shopId): string; /** @@ -97,7 +100,7 @@ public function getProjectConfigurationDirectory(): string; public function getShopConfigurationDirectory(int $shopId): string; /** - * @return string + * @deprecated method will be removed in next major, use getProjectConfigurationDirectory() instead */ public function getConfigurationDirectoryPath(): string; diff --git a/source/Internal/Transition/Utility/ContextInterface.php b/source/Internal/Transition/Utility/ContextInterface.php index 0c4609981c..70b019402d 100644 --- a/source/Internal/Transition/Utility/ContextInterface.php +++ b/source/Internal/Transition/Utility/ContextInterface.php @@ -31,6 +31,8 @@ public function getLogFilePath(): string; public function getRequiredContactFormFields(): array; /** + * @deprecated method will be removed in next major version + * * @return bool */ public function isEnabledAdminQueryLog(): bool; diff --git a/source/oxfunctions.php b/source/oxfunctions.php index 8d4e721965..ba7b1782c0 100644 --- a/source/oxfunctions.php +++ b/source/oxfunctions.php @@ -27,6 +27,7 @@ function isAdmin() * * @param int $iErrorNr error number * @param string $sErrorText error message + * @deprecated function will be removed in next major */ function warningHandler($iErrorNr, $sErrorText) { @@ -39,6 +40,7 @@ function warningHandler($iErrorNr, $sErrorText) * * @param mixed $mVar variable * @param bool $blToFile marker to write log info to file (must be true to log) + * @deprecated function will be removed in next major */ function dumpVar($mVar, $blToFile = false) { @@ -59,6 +61,7 @@ function dumpVar($mVar, $blToFile = false) * prints anything given into a file, for debugging * * @param mixed $mVar variable to debug + * @deprecated function will be removed in next major */ function debug($mVar) {