0

Magento2 override core interface class to add extra functions,

Magento\Catalog\Api\Data\CategoryTreeInterface 

To extend the core interface class to add ExtensibleDataInterface to the interface

Can someone please guide how to do this?

Vishwas Bhatnagar
  • 4,679
  • 3
  • 38
  • 60
Arjun
  • 3,576
  • 23
  • 59

1 Answers1

1

Magento 2 Preference does not allow us to override the interfaces. Preferences are used to specify the implementation classes for the interfaces and overriding implementation classes. It does not allow to override interface with an interface

The best solution for you is to create a patch for adding ExtensibleDataInterface

Also, I would suggest you check is there a specific reason Magento hasn't made that interface Extensible

Vishwas Bhatnagar
  • 4,679
  • 3
  • 38
  • 60