I have a few plugins in the worpress.org which are quite popular. Recently I renamed the main PHP file with plugin header to one that reflects the plugin slug as is the best practice. Earlier, my main PHP file had shorter names which I decided to change. The unfortunate result of this - the plugin gets deactivated on auto-update with an error - 'Plugin file does not exist'. This has resulted in my active installs going down every day with many users complaining about missing plugin functions without they being aware that the plugin itself was deactivated during update.
I want to issue an update which has the renamed main PHP file and at the same addresses the above deactivation issue. What is the best way?
Only way I see to resolve this is to have two main PHP files with plugin header - one with old name and another with new name (to avoid 'The plugin does not have a valid header.' error) and make the old PHP file call the new one through include/require file. Is there a better way so that we avoid having two PHP files with plugin header (feels like a hack).