I always thought it's some kind of epidemic plague that users behave in a high risk manner introducing
$installer->stopSetup() calls in installer scripts.
Many of the example code given (here and on other sites, you also find it in many of the extensions you can download) contains installer scripts starting with:
<?php $installer = $this; $installer->startSetup(); # some or many lines of code that do not # need $installer->startSetup(); at all for sure # # ... # $installer->endSetup();
I always was under the impression that this is bad practice and specifically should not be used in example code because it introduces the risk to needlessly loose
$installer->endSetup(); resulting in an inconsistent database configuration after setup which can endanger the whole installation.
So my question is, it is so? Is this a crystal clear case to give the advice to not make use of these methods unless you're 100% sure you need them?
I have the feeling that those are always put in because the author does not know what they are for but she thinks it needs to be there, it's cool to use them, it can't hurt and because it works anyway, continues with this risky practice.
I also thought to perhaps ask on meta because when I suggested edits earlier today, from what I see in feedback in review many users seem to be unsure on this point. I would love to see some clarification and reference about it.