Skip to content

Commit 5712a2a

Browse files
committed
Change to static ids
1 parent 651e700 commit 5712a2a

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

src/DataProvider/ProductProvider.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function getPayload(): array
147147
'visibility' => ProductVisibilityDefinition::VISIBILITY_ALL,
148148
],
149149
],
150-
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId),
150+
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId, 'a354cbf0b967'),
151151
],
152152
[
153153
'id' => '1901dc5e888f4b1ea4168c2c5f005540',
@@ -213,7 +213,7 @@ public function getPayload(): array
213213
'id' => '77421c4f75af40c8a57657cdc2ad49a2',
214214
],
215215
],
216-
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId),
216+
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId, '8c2c5f005540'),
217217
],
218218
[
219219
'id' => '2a88d9b59d474c7e869d8071649be43c',
@@ -286,7 +286,7 @@ public function getPayload(): array
286286
'id' => 'dc6f98beeca44852beb078a9e8e21e7d',
287287
],
288288
],
289-
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId),
289+
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId, '8071649be43c'),
290290
],
291291
[
292292
'id' => '3ac014f329884b57a2cce5a29f34779c',
@@ -349,7 +349,7 @@ public function getPayload(): array
349349
'id' => 'c53fa30db00e4a84b4516f6b07c02e8d',
350350
],
351351
],
352-
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId),
352+
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId, 'e5a29f34779c'),
353353
],
354354
[
355355
'id' => '43a23e0c03bf4ceabc6055a2185faa87',
@@ -509,7 +509,7 @@ public function getPayload(): array
509509
],
510510
],
511511
],
512-
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId),
512+
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId, '55a2185faa87'),
513513
],
514514
[
515515
'id' => 'c7bca22753c84d08b6178a50052b4146',
@@ -635,7 +635,7 @@ public function getPayload(): array
635635
],
636636
],
637637
],
638-
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId),
638+
'productReviews' => $this->productReviewHelper->createReviews($storefrontSalesChannel, $enLanguageId, '8a50052b4146'),
639639
],
640640
];
641641
}

src/helper/ProductReviewHelper.php

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
namespace Swag\PlatformDemoData\helper;
1111

1212
use Shopware\Core\Framework\Log\Package;
13-
use Shopware\Core\Framework\Uuid\Uuid;
1413
use Swag\PlatformDemoData\DataProvider\CustomerProvider;
1514

1615
#[Package('fundamentals@after-sales')]
@@ -19,11 +18,11 @@ class ProductReviewHelper
1918
/**
2019
* @return array<int, array<string, mixed>>
2120
*/
22-
public function createReviews(string $salesChannelId, string $languageId): array
21+
public function createReviews(string $salesChannelId, string $languageId, string $productIdSuffix): array
2322
{
2423
return [
2524
[
26-
'id' => Uuid::randomHex(),
25+
'id' => 'bc3b8f5a91294148bd9e' . $productIdSuffix,
2726
'salesChannelId' => $salesChannelId,
2827
'customerId' => CustomerProvider::CUSTOMER_ID,
2928
'languageId' => $languageId,
@@ -33,7 +32,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
3332
'status' => true,
3433
],
3534
[
36-
'id' => Uuid::randomHex(),
35+
'id' => '6b9697a1bc474bbba746' . $productIdSuffix,
3736
'salesChannelId' => $salesChannelId,
3837
'customerId' => CustomerProvider::CUSTOMER_ID,
3938
'languageId' => $languageId,
@@ -43,7 +42,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
4342
'status' => true,
4443
],
4544
[
46-
'id' => Uuid::randomHex(),
45+
'id' => '3252705de9f74c978378' . $productIdSuffix,
4746
'salesChannelId' => $salesChannelId,
4847
'customerId' => CustomerProvider::CUSTOMER_ID,
4948
'languageId' => $languageId,
@@ -53,7 +52,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
5352
'status' => true,
5453
],
5554
[
56-
'id' => Uuid::randomHex(),
55+
'id' => 'e14609c74a8846f49b72' . $productIdSuffix,
5756
'salesChannelId' => $salesChannelId,
5857
'customerId' => CustomerProvider::CUSTOMER_ID,
5958
'languageId' => $languageId,
@@ -63,7 +62,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
6362
'status' => true,
6463
],
6564
[
66-
'id' => Uuid::randomHex(),
65+
'id' => '069bbd0bc4be4cc48010' . $productIdSuffix,
6766
'salesChannelId' => $salesChannelId,
6867
'customerId' => CustomerProvider::CUSTOMER_ID,
6968
'languageId' => $languageId,
@@ -73,7 +72,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
7372
'status' => true,
7473
],
7574
[
76-
'id' => Uuid::randomHex(),
75+
'id' => 'aaf8cfcfdb2a4119940a' . $productIdSuffix,
7776
'salesChannelId' => $salesChannelId,
7877
'customerId' => CustomerProvider::CUSTOMER_ID,
7978
'languageId' => $languageId,
@@ -83,7 +82,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
8382
'status' => true,
8483
],
8584
[
86-
'id' => Uuid::randomHex(),
85+
'id' => '558ebb6881ee4be4ace0' . $productIdSuffix,
8786
'salesChannelId' => $salesChannelId,
8887
'customerId' => CustomerProvider::CUSTOMER_ID,
8988
'languageId' => $languageId,
@@ -93,7 +92,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
9392
'status' => true,
9493
],
9594
[
96-
'id' => Uuid::randomHex(),
95+
'id' => '6db0c9a73d08467fadd6' . $productIdSuffix,
9796
'salesChannelId' => $salesChannelId,
9897
'customerId' => CustomerProvider::CUSTOMER_ID,
9998
'languageId' => $languageId,
@@ -103,7 +102,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
103102
'status' => true,
104103
],
105104
[
106-
'id' => Uuid::randomHex(),
105+
'id' => 'a677a16c9db945f6ae39' . $productIdSuffix,
107106
'salesChannelId' => $salesChannelId,
108107
'customerId' => CustomerProvider::CUSTOMER_ID,
109108
'languageId' => $languageId,
@@ -113,7 +112,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
113112
'status' => true,
114113
],
115114
[
116-
'id' => Uuid::randomHex(),
115+
'id' => '29342e2bb0a742429e46' . $productIdSuffix,
117116
'salesChannelId' => $salesChannelId,
118117
'customerId' => CustomerProvider::CUSTOMER_ID,
119118
'languageId' => $languageId,
@@ -123,7 +122,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
123122
'status' => true,
124123
],
125124
[
126-
'id' => Uuid::randomHex(),
125+
'id' => 'e7f51983ff5f44848ed2' . $productIdSuffix,
127126
'salesChannelId' => $salesChannelId,
128127
'customerId' => CustomerProvider::CUSTOMER_ID,
129128
'languageId' => $languageId,
@@ -133,7 +132,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
133132
'status' => true,
134133
],
135134
[
136-
'id' => Uuid::randomHex(),
135+
'id' => 'e52d82f3f8344b7f9de0' . $productIdSuffix,
137136
'salesChannelId' => $salesChannelId,
138137
'customerId' => CustomerProvider::CUSTOMER_ID,
139138
'languageId' => $languageId,
@@ -143,7 +142,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
143142
'status' => true,
144143
],
145144
[
146-
'id' => Uuid::randomHex(),
145+
'id' => 'ef18e5dba80a4bd6a933' . $productIdSuffix,
147146
'salesChannelId' => $salesChannelId,
148147
'customerId' => CustomerProvider::CUSTOMER_ID,
149148
'languageId' => $languageId,
@@ -153,7 +152,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
153152
'status' => true,
154153
],
155154
[
156-
'id' => Uuid::randomHex(),
155+
'id' => '3569e6d6fde14c4c956d' . $productIdSuffix,
157156
'salesChannelId' => $salesChannelId,
158157
'customerId' => CustomerProvider::CUSTOMER_ID,
159158
'languageId' => $languageId,
@@ -163,7 +162,7 @@ public function createReviews(string $salesChannelId, string $languageId): array
163162
'status' => true,
164163
],
165164
[
166-
'id' => Uuid::randomHex(),
165+
'id' => 'bb335ee68add4f8a9f23' . $productIdSuffix,
167166
'salesChannelId' => $salesChannelId,
168167
'customerId' => CustomerProvider::CUSTOMER_ID,
169168
'languageId' => $languageId,

0 commit comments

Comments
 (0)