Log message #4170759

# At Username Text
# Oct 8th 2018, 12:29 CakeEater I use the standalone orm from cakephp for a websocket server (ratchet) and im using phpUnit for my tests, I would like to use the fixtures cakePHP generates.
# Oct 8th 2018, 12:26 lubos it seems that `patchEntity` is doing `query->firstOrFail` before patching, is that possible?
# Oct 8th 2018, 12:04 spencdev It should probably just be noted that whatever is being used as a delimiter couldn't be used as a search parameter
# Oct 8th 2018, 12:04 spencdev I'd agree, pretty rare. I think most people would use it as `,` though, which could cause some issues
# Oct 8th 2018, 12:00 dereuromark we could always add escaping options into it too, not sure if worth it, though
# Oct 8th 2018, 11:59 dereuromark I think | is rather similarly rare in actual use
# Oct 8th 2018, 11:59 dereuromark same thing with the wildcards :slightly_smiling_face:
# Oct 8th 2018, 11:59 dereuromark thats the point. yo need to configure it manually per use case.
# Oct 8th 2018, 11:51 spencdev what if you're literally looking for something with | in it?
# Oct 8th 2018, 11:42 dereuromark @admad etc: Can I have quick feedback on https://github.com/FriendsOfCake/search/pull/240 ? So I could write a few tests?
# Oct 8th 2018, 11:17 neon1024 perhaps cast to array and use `array_column()`
# Oct 8th 2018, 11:17 rrd564 @neon1024 thanks
# Oct 8th 2018, 11:17 neon1024 Or convert to array and use `array_unique`
# Oct 8th 2018, 11:16 neon1024 https://book.cakephp.org/3.0/en/core-libraries/collections.html#Cake\Collection\Collection::groupBy
# Oct 8th 2018, 11:16 neon1024 Probably `groupBy` would be my first guess
# Oct 8th 2018, 10:52 rrd564 what is the best way to get uniqe elements from a collection? For example in a blog I want to get all the tags used by the listed posts.
# Oct 8th 2018, 10:26 neon1024 The guys over in the PHP UG channel suggesting using ZAP Proxy, and it’s done great at identifying a bunch of things I can fix to help secure my project.
# Oct 8th 2018, 10:25 neon1024 Thanks!
# Oct 8th 2018, 10:25 josbeir sorry for the late reply :slightly_smiling_face:
# Oct 8th 2018, 10:24 josbeir @neon1024 yes escaped, unless you use updateAll and deleteAll etc
# Oct 8th 2018, 09:51 rudy1976s I normally avoid using json fields when I need to translate info
# Oct 8th 2018, 09:51 rudy1976s that was I though too
# Oct 8th 2018, 09:50 edgaras.jan possible but pretty hard
# Oct 8th 2018, 09:50 rudy1976s is possible ?
# Oct 8th 2018, 09:49 rudy1976s last question: what can be the best way to use Translate Behavior in such field ?
# Oct 8th 2018, 09:48 edgaras.jan `JSON_EXTRACT(json_field, '$.color')`
# Oct 8th 2018, 09:48 rudy1976s thank you !
# Oct 8th 2018, 09:47 edgaras.jan Read here first https://dev.mysql.com/doc/refman/5.7/en/json.html
# Oct 8th 2018, 09:44 rudy1976s for example in the json field I have a field called color : is possibile to use the ->where using the color json field?
# Oct 8th 2018, 09:42 rudy1976s but the query builder “knows” the fileds contained in the json ?
# Oct 8th 2018, 09:41 neon1024 The MySQL documentation shows you all the various sql you can use
# Oct 8th 2018, 09:41 neon1024 Sure you can
# Oct 8th 2018, 09:41 rudy1976s the column is used to store record parameters and sometimes I need to query against a value contained in that field
# Oct 8th 2018, 09:40 rudy1976s can I use the json fields in the query builder ?
# Oct 8th 2018, 09:39 rudy1976s I using a table with a columns used as json type
# Oct 8th 2018, 09:39 rudy1976s good morning
# Oct 8th 2018, 08:49 neon1024 I’m not convinced there are any, but need to test anyway
# Oct 8th 2018, 08:49 neon1024 I need to test my application for injections
# Oct 8th 2018, 08:47 neon1024 `->where(['example' => $escaped]);`
# Oct 8th 2018, 08:47 neon1024 Just to sanity check, the values in a condition array are already escaped right?
# Oct 8th 2018, 08:00 turkles gooday