When overriding a class with a custom one using the di.xml, are there any restrictions on what class you can override?
I have tried overriding a class of a third party module, but it does not appear to work. This class does not implement any interface, so I thought that maybe it's only interface implementations that can be used here?
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="Amasty\Feed\Model\Export\Adapter\Csv" type="Engmaso\Feed\Model\Export\Adapter\Csv" /> </config>
So here I'm trying to simply add my class in place of the Amasty one, but my class is never loaded.