1111use Magento \Eav \Model \Entity \Attribute ;
1212use Magento \Eav \Model \Entity \Setup \Context ;
1313use Magento \Eav \Model \Entity \Setup \PropertyMapperInterface ;
14- use Magento \Eav \Model \ReservedAttributeChecker ;
14+ use Magento \Eav \Model \ReservedAttributeCheckerInterface ;
1515use Magento \Eav \Model \ResourceModel \Entity \Attribute \Group \CollectionFactory ;
1616use Magento \Eav \Model \Validator \Attribute \Code ;
1717use Magento \Framework \App \CacheInterface ;
@@ -81,7 +81,7 @@ class EavSetup
8181 private $ attributeCodeValidator ;
8282
8383 /**
84- * @var ReservedAttributeChecker
84+ * @var ReservedAttributeCheckerInterface
8585 */
8686 private $ reservedAttributeChecker ;
8787
@@ -104,7 +104,7 @@ class EavSetup
104104 * @param CollectionFactory $attrGroupCollectionFactory
105105 * @param Code|null $attributeCodeValidator
106106 * @param AddOptionToAttribute|null $addAttributeOption
107- * @param ReservedAttributeChecker |null $reservedAttributeChecker
107+ * @param ReservedAttributeCheckerInterface |null $reservedAttributeChecker
108108 * @param AttributeFactory|null $attributeFactory
109109 * @param Config|null $eavConfig
110110 * @SuppressWarnings(PHPMD.LongVariable)
@@ -116,7 +116,7 @@ public function __construct(
116116 CollectionFactory $ attrGroupCollectionFactory ,
117117 Code $ attributeCodeValidator = null ,
118118 AddOptionToAttribute $ addAttributeOption = null ,
119- ReservedAttributeChecker $ reservedAttributeChecker = null ,
119+ ReservedAttributeCheckerInterface $ reservedAttributeChecker = null ,
120120 AttributeFactory $ attributeFactory = null ,
121121 Config $ eavConfig = null
122122 ) {
@@ -128,7 +128,7 @@ public function __construct(
128128 ?? ObjectManager::getInstance ()->get (AddOptionToAttribute::class);
129129 $ this ->attributeCodeValidator = $ attributeCodeValidator ?? ObjectManager::getInstance ()->get (Code::class);
130130 $ this ->reservedAttributeChecker = $ reservedAttributeChecker
131- ?? ObjectManager::getInstance ()->get (ReservedAttributeChecker ::class);
131+ ?? ObjectManager::getInstance ()->get (ReservedAttributeCheckerInterface ::class);
132132 $ this ->attributeFactory = $ attributeFactory ?? ObjectManager::getInstance ()->get (AttributeFactory::class);
133133 $ this ->eavConfig = $ eavConfig ?? ObjectManager::getInstance ()->get (Config::class);
134134 }
@@ -250,6 +250,7 @@ public function addEntityType($code, array $params)
250250 $ this ->addAttributeSet ($ code , $ this ->_defaultAttributeSetName );
251251 }
252252 $ this ->addAttributeGroup ($ code , $ this ->_defaultGroupName , $ this ->_generalGroupName );
253+ $ this ->eavConfig ->clear ();
253254
254255 return $ this ;
255256 }
@@ -1375,7 +1376,7 @@ public function installEntities($entities = null)
13751376
13761377 foreach ($ entities as $ entityName => $ entity ) {
13771378 $ this ->addEntityType ($ entityName , $ entity );
1378- $ this -> eavConfig -> clear ();
1379+
13791380 $ frontendPrefix = isset ($ entity ['frontend_prefix ' ]) ? $ entity ['frontend_prefix ' ] : '' ;
13801381 $ backendPrefix = isset ($ entity ['backend_prefix ' ]) ? $ entity ['backend_prefix ' ] : '' ;
13811382 $ sourcePrefix = isset ($ entity ['source_prefix ' ]) ? $ entity ['source_prefix ' ] : '' ;
0 commit comments