Log message #4186805

# At Username Text
# May 17th 2019, 15:20 martin ```$user = $this->Users->find()->where(function ($exp, $query) use ($line) { $conc = $query->func()->concat([ 'firstname' => 'identifier', ' ', 'lastname' => 'identifier' ]); return $exp->eq($conc, $line); })->first();```
# May 17th 2019, 15:19 jeremyharris I guess if you’re he’s looking for an exact match, I just assumed fuzzy
# May 17th 2019, 15:18 admad why bother concating? `WHERE first_name like ‘%jeremy%’ OR last_name like ‘%jeremy%’` would yield the same matches
# May 17th 2019, 15:16 jeremyharris so something like WHERE CONCAT(first_name. ' ‘, last_name) like ‘%jeremy%’
# May 17th 2019, 15:16 martin found it
# May 17th 2019, 15:16 martin oh, yes just started thinking about googleing on concat instead combine :P
# May 17th 2019, 15:15 jeremyharris concat
# May 17th 2019, 15:15 martin I’ve users with a firstname and lastname field in database. now I need to search on full name? what is best way to do this? need to combine 2 fields (with space between). I know how to do this in mysql but how do I do it the right way in cake query?
# May 17th 2019, 15:09 admad i don't but that does look useful
# May 17th 2019, 15:04 dereuromark Is someone using DTOs yet as well? Does read() make sense similar to cake core? https://github.com/dereuromark/cakephp-dto/issues/21
# May 17th 2019, 14:33 voycey had the benefit of slimming down our code somewhat
# May 17th 2019, 14:33 voycey we re-wrote to be honest - it was a killer trying to migrate
# May 17th 2019, 14:06 neothermic we did cake 1 to cake 2 a few years back, and now the cake2 is even larger than before...
# May 17th 2019, 14:06 nils Haha, I don't envy you!
# May 17th 2019, 14:06 neothermic Welcome to my hell, except this codebase started late 2010 on cake1 :)
# May 17th 2019, 14:05 nils I guess. I'm the only developer in it. The project started 2013 so I get quite frustrated with the 2013-version of me. :slightly_smiling_face:
# May 17th 2019, 14:02 neothermic how large the codebase is, how many developers you have, how many cake2-isims you've got, how recent your cake2 install is, how much you rely on removed functionality, etc
# May 17th 2019, 14:01 neothermic I suspect the time it takes varies on multiple factors
# May 17th 2019, 14:01 neothermic I'm slowly doing that now
# May 17th 2019, 14:01 nils Did anyone migrate from 2.x to 3.x? How time consuming should I expect it to be?
# May 17th 2019, 14:00 neothermic but yeah, any thoughts on why this isn't behaving the same?
# May 17th 2019, 13:57 neothermic :)
# May 17th 2019, 13:57 dereuromark I know I am
# May 17th 2019, 13:56 dereuromark you know, there are things in life where you want to be replaced by machines
# May 17th 2019, 13:56 neothermic but this one is odd, as I'm not sure why I'm losing the subkey; is that expected?
# May 17th 2019, 13:56 neothermic well, the basic testcase is me running the change manually, comparing the outputs :)
# May 17th 2019, 13:56 dereuromark always good to have basic test cases around your internal business logic to catch this early on when migrating
# May 17th 2019, 13:55 neothermic but Hash::Extract with the path of `'Report'` returns the data without the 'Report' subkeying
# May 17th 2019, 13:54 neothermic So we have an array that is basically from a find, that contains a key called 'Report', and then has subitems, and each item is an array of id, etc. `Set::extract('/Report'` on the data returns structure like: ```array( (int) 0 => array( 'Report' => array( 'id' => '45'
# May 17th 2019, 13:52 neothermic argh, Hash::extract is doing something slightly different from Set::extract :O
# May 17th 2019, 13:20 neon1024 Sounds good, sign me up @admad
# May 17th 2019, 13:20 admad are PHP "influencers" available for hire? we could then spend 1 year's cakefest budget on them instead :P
# May 17th 2019, 13:18 np :wave: I forwarded your response to my colleague. Thanks
# May 17th 2019, 13:18 dereuromark One reddit article after 4.0 release might do the trick :P and noise
# May 17th 2019, 13:17 admad I hope people care enough about clean code and it gets us more users :slightly_smiling_face:
# May 17th 2019, 13:15 dereuromark I am shocked and suprised at the same time that both laravel and symfony are not using phpstan/psalm and dismiss any addition as "current code is fine", even though the people showed them that the opposite is true.. Funny that cake already has - and soon will even more so have - the cleanest framework code by far :slightly_smiling_face:
# May 17th 2019, 13:13 nils @dereuromark trying to convince the client to move to 3.x. But it's a huge job, I guess.
# May 17th 2019, 13:10 dereuromark that is too long ago, I cant recall, but could very well be not in schema. You can either PR it, or we ignore it (as I would)
# May 17th 2019, 13:09 dereuromark sry, my brain starts to ignore 2.x :P
# May 17th 2019, 13:08 nils That's only for 3.x, or am I mistaken? I'm running 2.x.
# May 17th 2019, 13:03 dereuromark but it is all documented even in mine: https://github.com/dereuromark/cakephp-queue/tree/master/docs#installation