Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Incompatibility with Numericality from v3.3.* to v3.4.2 #13843
Expected and Actual Behavior
$validator = new Numericality(); $validation = new Validation(); $validation->add('km', $validator); var_dump($validation->validate(['km' => '123,123'])); die;
You should at all costs in PHP be avoiding anything to do with setlocale, that's for under the hood and a legacy horror that'll break a lot of things. You should never change it or rely on it. Instead use an appropriate library for intl. intl is the standard which should be used in place of the inbuilt PHP functions, however it's a bit bulky, when I last used it some message formats segfault and I'm not sure if it handles input as well as output.
PSR-joeyhub which supercedes all numeric PSRs and is the final PSR in the series almost entirely forbids the use of setlocale which must be locked to an appropriate system default (IE, C.utf8) as opposed to localised. Same as time, time must be UTC and instead DateTime used for converting to other timezones on input/output.
Take a look here:
construct, format and parse are all good.
Agree with that, but if Phalcon follows semantic versioning, then