wfPercent() has been in MediaWiki since 2005 (rSVN10163 / be977a75d7b3fd55), and I think it makes sense to deprecate and remove it for several reasons.
It is hardly ever used, with only one current use within Wikimedia maintained code: in ParserTestPrinter, since rSVN10164 (68871fa25dbe1aa3). The other known uses are in:
- MediaWiki-extensions-Editcount , since rSVN10165 (7b39583594235c51)
deleteImageMemcached.php, since rSVN10963 (8949a076eb6eeb3d)(file deleted in eb11a00a1e15bec1)profileinfo.php, since rSVN29759 (972b0afa76d11d6e)(file deleted in 0da1ecfd89ec87af)- EditCountNeue extension
It is not internationalized. In user-visible output such as that generated by the extensions, users likely expect the percent sign to be used as is customary in their language (after or before the number, with or without a space, or even a different form of the symbol, as in Persian). This is in addition to issues with number formatting in general.
Its valid use cases are not documented. Different use cases may support or justify different rounding methods. As an example, a setup utility might always round down the completion percentage, to not show 100% until completely done, or might scale values in (0%, 100%) to [0.5%, 99.5%] before rounding to nearest, ties to odd, to indicate progress earlier. They may also justify different sets of parameters in the API, with separate parameters for numerator and denominator of a fraction being one alternative choice.
The few remaining uses are trivial to replace while maintaining existing levels of functionality. All known callers use the defaults of acc: 2, round: true. If the percent sign is added separately, round() would likely suffice. There is a rounding difference: sprintf() with %f rounds the exact value, including any floating-point error, ties to even, while round() pre-rounds to 15 significant digits (according to a 2008 RFC) and rounds ties away from zero by default. However, it probably doesn't matter in these instances.