@@ -151,7 +151,11 @@ class ConfigurableProductsFixture extends Fixture
151
151
private $ swatchesGenerator ;
152
152
153
153
/**
154
- * ConfigurableProductsFixture constructor.
154
+ * @var \Magento\Framework\Serialize\SerializerInterface
155
+ */
156
+ private $ serializer ;
157
+
158
+ /**
155
159
* @param FixtureModel $fixtureModel
156
160
* @param AttributeSet\AttributeSetFixture $attributeSetsFixture
157
161
* @param AttributeSet\Pattern $attributePattern
@@ -163,7 +167,8 @@ class ConfigurableProductsFixture extends Fixture
163
167
* @param CategoryResolver $categoryResolver
164
168
* @param WebsiteCategoryProvider $websiteCategoryProvider
165
169
* @param PriceProvider $priceProvider
166
- * @param \Magento\Setup\Fixtures\AttributeSet\SwatchesGenerator $swatchesGenerator
170
+ * @param AttributeSet\SwatchesGenerator $swatchesGenerator
171
+ * @param \Magento\Framework\Serialize\SerializerInterface $serializer
167
172
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
168
173
*/
169
174
public function __construct (
@@ -178,7 +183,8 @@ public function __construct(
178
183
CategoryResolver $ categoryResolver ,
179
184
WebsiteCategoryProvider $ websiteCategoryProvider ,
180
185
PriceProvider $ priceProvider ,
181
- \Magento \Setup \Fixtures \AttributeSet \SwatchesGenerator $ swatchesGenerator
186
+ \Magento \Setup \Fixtures \AttributeSet \SwatchesGenerator $ swatchesGenerator ,
187
+ \Magento \Framework \Serialize \SerializerInterface $ serializer
182
188
) {
183
189
parent ::__construct ($ fixtureModel );
184
190
$ this ->attributeSetsFixture = $ attributeSetsFixture ;
@@ -192,6 +198,7 @@ public function __construct(
192
198
$ this ->websiteCategoryProvider = $ websiteCategoryProvider ;
193
199
$ this ->priceProvider = $ priceProvider ;
194
200
$ this ->swatchesGenerator = $ swatchesGenerator ;
201
+ $ this ->serializer = $ serializer ;
195
202
}
196
203
197
204
/**
@@ -638,7 +645,7 @@ private function getConfigurableSkuPattern($config, $attributeSetName)
638
645
*/
639
646
private function getCustomAttributeSet (array $ attributes )
640
647
{
641
- $ attributeSetHash = md5 ( json_encode ($ attributes ));
648
+ $ attributeSetHash = crc32 ( $ this -> serializer -> serialize ($ attributes ));
642
649
$ attributeSetName = sprintf ('Dynamic Attribute Set %s ' , $ attributeSetHash );
643
650
644
651
$ pattern = $ this ->attributePattern ->generateAttributeSet (
0 commit comments