Clark Everetts
Clark Everetts
Thanks for reporting this, and for looking into the source code for the cause. I'll write a reproduction test case and then fix. I've got work-related time constraints, but I'll...
Oddly enough, I did this very change in someone's code yesterday using regex substitutions: From: ```php setlocale(LC_MONETARY, 'en_US'); echo money_format( '%(n', ($rowm1['00001'])); // wrap output in () if negative ```...
Since I've not used either `money_format()` or `NumberFormatter` class much before this client's code migration, I'm not intimately familiar with their behaviour. So, I looked here for inspiration: https://github.com/php/php-src/tree/master/ext/intl/tests (formatter_*.phpt)...
I'll have all the mappings I can do completed sometime this afternoon.
I'm not done with the mapping, and certainly not sending you a PR this morning, but to prove I'm doing _something_: https://gist.github.com/clarkphp/b2643a4c4a16cafd02bd85eba18a72dd
Don't worry; don't read that code as if I think it close to what the rector/fixer would look like. That's just a scratchpad for figuring out the behavior of money_format()...
@samsonasik Just letting you know I'm still working on this. See experiments and output at https://gist.github.com/clarkphp/b2643a4c4a16cafd02bd85eba18a72dd Modeling after your initial PR, I've got new code or modifications in: - rector-src/rules/Php74/Rector/FuncCall/MoneyFormatToNumberFormatterRector.php...
This makes so much sense. But then, you knew that, already. I may be able to help with this, or #21 .
# Test Infrastructure Do you envision an _xUnit-style framework_ for running tests, or a test _infrastructure_ that is rather pared down in comparison? If one thinks in terms of: *...
It appears to my untrained eye that there is sufficient code for a few hands to work on this task without stomping on each other's toes. And the code review...