totten / civix

CiviCRM Extension Builder
http://civicrm.org/
Other
56 stars 56 forks source link

Smarty Substitution - Recommend 'smarty@1' or 'smarty-v2@1' depending on environment #330

Closed totten closed 7 months ago

totten commented 7 months ago

Overview

As of Civi 5.71 (https://github.com/civicrm/civicrm-core/pull/29187), the smarty-v2 mixin has a new name: smarty. Because... it's not necessarily Smarty v2. Both names will continue to work in the same way. However, we should start encouraging the new name.

Before

Whenever civix activates Smarty support, it uses smarty-v2@1.x.x.

After

Whenever civix activates Smarty support, it checks the compatibility (eg <ver>5.50</ver> or <ver>5.75</ver>). If the target is 5.71+, then it will prefer the new name.

Comments

There's a trade-off in how one does this:

TBH, I think both problems are superficial, and I don't think it really matters. My guess is that we'd get more pushback about extra-files than about the old-name, so that's what this PR does.