Log message #4054204

# At Username Text
# Jul 19th 2017, 15:56 inoas yes obviously
# Jul 19th 2017, 15:56 inoas well the latter Elm like exception could work ;)
# Jul 19th 2017, 15:56 jeremyharris oh so the validator rejects all keys that aren’t in the schema?
# Jul 19th 2017, 15:56 inoas (did you mean category ;)
# Jul 19th 2017, 15:55 inoas 'cagetory' hash key exists but was not expected
# Jul 19th 2017, 15:55 jeremyharris how would you alert the dev that this is a problem: foo(‘argAhere’, ‘argBhere’, [‘cagetory’ => ‘foo’, ‘link’ => [‘action’ => ‘bar’], ‘filters’ => ‘onSale’]);
# Jul 19th 2017, 15:55 inoas "consumable"
# Jul 19th 2017, 15:55 inoas it just makes sure the $options you pass to a method/function are processable/valid datatype
# Jul 19th 2017, 15:54 inoas it allows for deeply nested structures, optionality, default values, data type checks ... sure it doesn't (and should not do) application state checks (does this id exist in the database)
# Jul 19th 2017, 15:54 inoas https://gist.github.com/ionas/94e961bf414c78362442041081dad3ca lists all the possible options, the mandatory and optional onces... if you specify something other than that you should get an exception
# Jul 19th 2017, 15:53 inoas and give it another valid data type value
# Jul 19th 2017, 15:53 inoas as long as you do not accidentially type another valid hash key ;)
# Jul 19th 2017, 15:53 inoas jeremyharris but it DOES solve the miss-spelling
# Jul 19th 2017, 15:52 inoas set to throw an exception by default
# Jul 19th 2017, 15:52 inoas so maybe you are right... bool should do
# Jul 19th 2017, 15:52 inoas but meh... future apps
# Jul 19th 2017, 15:52 inoas if you set it to true/exception by default, apps will break
# Jul 19th 2017, 15:52 inoas if you set it to ignore/false by default people will not notice ;)
# Jul 19th 2017, 15:52 dereuromark sure
# Jul 19th 2017, 15:52 inoas well I think the most important thing is to notify the developer that s/he did something wrong
# Jul 19th 2017, 15:51 dereuromark both meeh
# Jul 19th 2017, 15:51 dereuromark a bool would suffice IMO :slightly_smiling_face:
# Jul 19th 2017, 15:51 jeremyharris inoas yes I’m afraid of the verbosity as well. we’ve discussed validating like that, which I’m more in support for, however it doesn’t solve one of the key problems which is misspelled optional *keys* (e.g., cagetory instead of category). In a discussion I actually brought up this simple validation technique and was called out on the misspelled keys problem, something I totally didn’t think about :slightly_smiling_face:
# Jul 19th 2017, 15:51 inoas set it to warn by default so that developers get notified by default but their apps do not break
# Jul 19th 2017, 15:51 inoas 'warn' and 'exception'
# Jul 19th 2017, 15:51 inoas dereuromark https://github.com/cakephp/cakephp/issues/10723#issuecomment-316429214 - opt-in flag I'd do 3 states: 'ignore',
# Jul 19th 2017, 15:35 inoas I am not a pro on php errors but maybe that means it cannot find I18n at all
# Jul 19th 2017, 15:35 inoas check I18n if there is a insertArgs at all
# Jul 19th 2017, 15:35 inoas and updating cakephp to 2.9
# Jul 19th 2017, 15:35 inoas and setting up a good environment with the recommended php version (like 5.6) there
# Jul 19th 2017, 15:34 inoas domgeek what I would try is cakebox or homestead or puphpet.net
# Jul 19th 2017, 15:34 inoas for anything else I like the new setters/getters
# Jul 19th 2017, 15:34 inoas jeremyharris its ok! you are not obligated to do anything and I respect that 101%! I am just a bit afraid on ultra verbose setters for $options and query building
# Jul 19th 2017, 15:33 jeremyharris Inoas not ignoring you, I had some morning chores to do. I'll get back to you in a bit when I'm done with them :)
# Jul 19th 2017, 15:33 inoas also did you try to switch debug on and off like https://github.com/cakephp/cakephp/issues/6072#issuecomment-80942582 suggested
# Jul 19th 2017, 15:33 neon1024 @domgeek I would recommend rephrasing your question, or providing more information.
# Jul 19th 2017, 15:33 inoas then ./Console/cakeshell
# Jul 19th 2017, 15:32 inoas domgeek tbh, I can't help you either but I would first do cd /var/www/tender.ng/public_html/app/
# Jul 19th 2017, 15:31 inoas maybe a warning in the console could help
# Jul 19th 2017, 15:31 domgeek @all
# Jul 19th 2017, 15:30 inoas @dereuromark I don't think adding more magic to a "broken" behavior that mysql <5.7 suggested to use is a good thing in the core ;) @ https://github.com/cakephp/cakephp/issues/10723#issuecomment-316423873