Skip to content

Commit 47fc9df

Browse files
committed
MAGETWO-96566: Data is not re encrypted in database after upgrade from 2.2 to 2.3 and switching PHP version
1 parent 2eb1884 commit 47fc9df

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/code/Magento/EncryptionKey/Setup/Patch/Data/SodiumChachaPatch.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace Magento\EncryptionKey\Setup\Patch\Data;
99

1010
use Magento\Framework\Setup\Patch\DataPatchInterface;
11+
use Magento\Framework\App\ObjectManager;
1112

1213
/**
1314
* Migrate encrypted configuration values to the latest cipher
@@ -45,20 +46,20 @@ class SodiumChachaPatch implements DataPatchInterface
4546
* @param \Magento\Config\Model\Config\Structure\Proxy $structure
4647
* @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
4748
* @param \Magento\Framework\App\State $state
48-
* @param \Magento\Framework\Config\ScopeInterface $scope
49+
* @param \Magento\Framework\Config\ScopeInterface|null $scope
4950
*/
5051
public function __construct(
5152
\Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup,
5253
\Magento\Config\Model\Config\Structure\Proxy $structure,
5354
\Magento\Framework\Encryption\EncryptorInterface $encryptor,
5455
\Magento\Framework\App\State $state,
55-
\Magento\Framework\Config\ScopeInterface $scope
56+
\Magento\Framework\Config\ScopeInterface $scope = null
5657
) {
5758
$this->moduleDataSetup = $moduleDataSetup;
5859
$this->structure = $structure;
5960
$this->encryptor = $encryptor;
6061
$this->state = $state;
61-
$this->scope = $scope;
62+
$this->scope = $scope ?? ObjectManager::getInstance()->get(\Magento\Framework\Config\ScopeInterface::class);
6263
}
6364

6465
/**

0 commit comments

Comments
 (0)