|
10 | 10 | use Shopware\Core\Content\Property\PropertyGroupDefinition; |
11 | 11 | use Shopware\Core\Framework\Context; |
12 | 12 | use Shopware\Core\Framework\Log\Package; |
| 13 | +use Shopware\Core\Framework\Util\Hasher; |
13 | 14 | use SwagMigrationAssistant\Migration\Converter\ConvertStruct; |
14 | 15 | use SwagMigrationAssistant\Migration\DataSelection\DefaultEntities; |
15 | 16 | use SwagMigrationAssistant\Migration\Logging\Log\Builder\SwagMigrationLogBuilder; |
@@ -49,7 +50,7 @@ public function getSourceIdentifier(array $data): string |
49 | 50 | $group = $data['group']['name']; |
50 | 51 | } |
51 | 52 |
|
52 | | - return \hash('md5', \mb_strtolower($data['name'] . '_' . $group . '_' . $data['type'])); |
| 53 | + return Hasher::hash(\mb_strtolower($data['name'] . '_' . $group . '_' . $data['type']), 'md5'); |
53 | 54 | } |
54 | 55 |
|
55 | 56 | public function getMediaUuids(array $converted): ?array |
@@ -92,15 +93,15 @@ public function convert(array $data, Context $context, MigrationContextInterface |
92 | 93 | $mapping = $this->mappingService->getOrCreateMapping( |
93 | 94 | $this->connectionId, |
94 | 95 | DefaultEntities::PROPERTY_GROUP_OPTION, |
95 | | - \hash('md5', \mb_strtolower($data['name'] . '_' . $data['group']['name'])), |
| 96 | + Hasher::hash(\mb_strtolower($data['name'] . '_' . $data['group']['name']), 'md5'), |
96 | 97 | $context |
97 | 98 | ); |
98 | 99 | $this->mappingIds[] = $mapping['id']; |
99 | 100 |
|
100 | 101 | $propertyGroupMapping = $this->mappingService->getOrCreateMapping( |
101 | 102 | $this->connectionId, |
102 | 103 | DefaultEntities::PROPERTY_GROUP, |
103 | | - \hash('md5', \mb_strtolower($data['group']['name'])), |
| 104 | + Hasher::hash(\mb_strtolower($data['group']['name']), 'md5'), |
104 | 105 | $context |
105 | 106 | ); |
106 | 107 | $this->mappingIds[] = $propertyGroupMapping['id']; |
@@ -257,15 +258,15 @@ protected function createAndDeleteNecessaryMappings(array $data, array $converte |
257 | 258 | $this->mainMapping = $this->mappingService->getOrCreateMapping( |
258 | 259 | $this->connectionId, |
259 | 260 | DefaultEntities::PROPERTY_GROUP_OPTION, |
260 | | - \hash('md5', \mb_strtolower($data['name'] . '_' . $data['group']['name'] . '_' . $data['type'])), |
| 261 | + Hasher::hash(\mb_strtolower($data['name'] . '_' . $data['group']['name'] . '_' . $data['type']), 'md5'), |
261 | 262 | $this->context, |
262 | 263 | $this->checksum |
263 | 264 | ); |
264 | 265 |
|
265 | 266 | $mapping = $this->mappingService->getOrCreateMapping( |
266 | 267 | $this->connectionId, |
267 | 268 | DefaultEntities::PROPERTY_GROUP_OPTION, |
268 | | - \hash('md5', \mb_strtolower($data['group']['name'] . '_' . $data['type'])), |
| 269 | + Hasher::hash(\mb_strtolower($data['group']['name'] . '_' . $data['type']), 'md5'), |
269 | 270 | $this->context |
270 | 271 | ); |
271 | 272 | $this->mappingIds[] = $mapping['id']; |
|
0 commit comments