I created some attribute for the customer entity, so I used a data Patch to declare the new attribute (it's then an EAV attribute) and assign the attribute group and attribute set. Everything works fine (I can access this EAV attribute from the backend and from the frontend).
I was wondering: do I have to create an extension_attribute.xml and declare my new attribute? I don't understand the need for that, cause I can access the attribute value from customer API interface too (without the extension_attribute.xml).
So, I can access my attribute from custom_attribute, is there an interest to declare it as an extension_attribute too?
More generally, what is the purpose to declare an extension_attribute for an EAV entity (like customer or product)? Because as an extension attribute, we have to create the plugin for get and save method of the repository whereas it s not necessary for the EAV attribute (custom attribute). For instance, the is_disabled attribute is an extension attribute for the customer
Thanks for your help