I want to modify a Joomla extension code. I know how to use template overrides, but the extension is not written in MVC pattern and even if it was, I would be going to change the controller code. In fact I'm going to modify a specific method in a class. How can I do this change without worrying about an update of the extension in future overriding my changes? And what about adding funationality and parameters? I may want to publish my changes back to the community. How can I do that?
If the component does not use Joomla's MVC pattern, it will be nearly impossible to make own update-safe overrides. Ask the developer why he is not willing to learn MVC before developing components... On the other hand, each component has to use the basics of Joomla's MVC in order to work. So you can always use core overrides, but have to override the whole class. Take a look at this document, it will explain how to override model and controllers: