Hi everybody.
I am trying to develop an easy module. It is my first one, so it may be some stupid problem but the fact is I'm stuck with it from some days ago.
I have a simple module that has a override/classes/Product.php class. It adds a simple single method. When I install it, all is fine. The overriden Product class is generated.
The problem is when I do some changes and I try to reinstall it (reseting it or uninstalling and installing, again, the result is the same). The method I added to the overriden class is not deleted completly when I uninstall the module. Only the name is removed but not the function body.
This causes a Fatal error: Uncaught exception 'ReflectionException' with message 'Class ProductOverrideOriginal_remove539defbda2a6c does not exist'
I paste the generated code.
When I install the module for first time I got:
class Product extends ProductCore {
public function getLocalizationImage(Context $context = null)
{
return true;
}
}
When I reinstall it, or uninstall it the classe is left as follows:
class Product extends ProductCore {
{
return true;
}
}
Is it normal? What am I missing? The same problem if I do a second module that adds a DIFFERENT function to the Produt class. The second module I install has no name in its function declarations.
Any help would be appreciate.
Thanks!