<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Eav\Model\Entity\Setup\PropertyMapperInterface" type="Magento\Eav\Model\Entity\Setup\PropertyMapper\Composite" />
    <preference for="Magento\Eav\Model\Entity\AttributeLoaderInterface" type="Magento\Eav\Model\Entity\AttributeLoader" />
    <preference for="Magento\Eav\Api\Data\AttributeInterface" type="Magento\Eav\Model\Entity\Attribute" />
    <preference for="Magento\Eav\Api\AttributeRepositoryInterface" type="Magento\Eav\Model\AttributeRepository" />
    <preference for="Magento\Eav\Api\Data\AttributeGroupInterface" type="Magento\Eav\Model\Entity\Attribute\Group" />
    <preference for="Magento\Eav\Api\AttributeGroupRepositoryInterface" type="Magento\Eav\Model\Attribute\GroupRepository" />
    <preference for="Magento\Eav\Api\AttributeSetRepositoryInterface" type="Magento\Eav\Model\AttributeSetRepository" />
    <preference for="Magento\Eav\Api\AttributeSetManagementInterface" type="Magento\Eav\Model\AttributeSetManagement" />
    <preference for="Magento\Eav\Api\Data\AttributeSetInterface" type="Magento\Eav\Model\Entity\Attribute\Set" />
    <preference for="Magento\Eav\Api\AttributeManagementInterface" type="Magento\Eav\Model\AttributeManagement" />
    <preference for="Magento\Eav\Api\Data\AttributeFrontendLabelInterface" type="Magento\Eav\Model\Entity\Attribute\FrontendLabel" />
    <preference for="Magento\Eav\Api\Data\AttributeOptionInterface" type="Magento\Eav\Model\Entity\Attribute\Option" />
    <preference for="Magento\Eav\Api\AttributeOptionManagementInterface" type="Magento\Eav\Model\Entity\Attribute\OptionManagement" />
    <preference for="Magento\Eav\Api\Data\AttributeOptionLabelInterface" type="Magento\Eav\Model\Entity\Attribute\OptionLabel" />
    <preference for="Magento\Eav\Api\Data\AttributeValidationRuleInterface" type="Magento\Eav\Model\Entity\Attribute\ValidationRule" />
    <preference for="Magento\Eav\Api\Data\AttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
    <preference for="Magento\Eav\Api\Data\AttributeSetSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
    <preference for="Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
    <preference for="Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface" type="Magento\Eav\Model\EavCustomAttributeTypeLocator" />

    <type name="Magento\Eav\Model\Entity\Attribute\Config">
        <arguments>
            <argument name="reader" xsi:type="object">Magento\Eav\Model\Entity\Attribute\Config\Reader\Proxy</argument>
        </arguments>
    </type>
    <type name="Magento\Eav\Model\ResourceModel\Helper">
        <arguments>
            <argument name="modulePrefix" xsi:type="string">eav</argument>
        </arguments>
    </type>
    <type name="Magento\Eav\Model\Entity\Setup\PropertyMapper\Composite">
        <arguments>
            <argument name="propertyMappers" xsi:type="array">
                <item name="default" xsi:type="string">Magento\Eav\Model\Entity\Setup\PropertyMapper</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Eav\Model\ResourceModel\Entity\Attribute">
        <plugin name="storeLabelCaching" type="Magento\Eav\Plugin\Model\ResourceModel\Entity\Attribute" />
    </type>
    <type name="Magento\Eav\Model\EavCustomAttributeTypeLocator">
        <arguments>
            <argument name="serviceEntityTypeMap" xsi:type="array" />
            <argument name="serviceBackendModelDataInterfaceMap" xsi:type="array" />
        </arguments>
    </type>
    <type name="Magento\Eav\Model\Entity\Attribute">
        <arguments>
            <argument name="reservedAttributeList" xsi:type="object">Magento\Catalog\Model\Product\ReservedAttributeList\Proxy</argument>
        </arguments>
    </type>
    <type name="Magento\Framework\EntityManager\Operation\AttributePool">
        <arguments>
            <argument name="extensionActions" xsi:type="array">
                <item name="eav" xsi:type="array">
                    <item name="default" xsi:type="array">
                        <item name="read" xsi:type="string">Magento\Eav\Model\ResourceModel\ReadHandler</item>
                        <item name="create" xsi:type="string">Magento\Eav\Model\ResourceModel\CreateHandler</item>
                        <item name="update" xsi:type="string">Magento\Eav\Model\ResourceModel\UpdateHandler</item>
                    </item>
                </item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Framework\Model\EntitySnapshot\AttributeProvider">
        <arguments>
            <argument name="providers" xsi:type="array">
                <item name="default" xsi:type="array">
                    <item name="eav" xsi:type="string">\Magento\Eav\Model\AttributeProvider</item>
                </item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Eav\Model\Entity\AbstractEntity">
        <plugin name="clean_cache" type="Magento\Framework\App\Cache\FlushCacheByTags" />
    </type>
</config>

