# |
Jan 3rd 2019, 02:56 |
hmic |
Welcome |
# |
Jan 3rd 2019, 02:55 |
NickBusey |
Yup, that was it. Thanks |
# |
Jan 3rd 2019, 02:51 |
NickBusey |
Hmm, that is probably it then |
# |
Jan 3rd 2019, 02:49 |
hmic |
if you don't have a fully qualified path, the path it uses is different (cwd) from the commandline and webserver (ROOT vs WEBROOT usually) |
# |
Jan 3rd 2019, 02:48 |
hmic |
NickBusey, what does your database config look like? are you sure it uses the database file you provide? |
# |
Jan 3rd 2019, 02:30 |
NickBusey |
Heh, sure, but as a data source it's not working |
# |
Jan 3rd 2019, 02:25 |
admad |
NickBusey: if you are using debugkit then you too already have cake working with sqlite :) |
# |
Jan 2nd 2019, 23:43 |
NickBusey |
Anyone gotten Sqlite working with cake? Still getting `Cannot describe users. It has 0 columns.` despite that table having columns. Have cleared cake's cache |
# |
Jan 2nd 2019, 22:08 |
ricksaccous |
wew |
# |
Jan 2nd 2019, 22:07 |
phantomwatson |
Sadly, at the current stage that I'm at in refactoring and overhauling a very broken site, it would be a little cumbersome to get it operational enough to test this. |
# |
Jan 2nd 2019, 22:06 |
ricksaccous |
also hope you're handling the case where tagNames is empty |
# |
Jan 2nd 2019, 22:06 |
ricksaccous |
you can prob just do $q->where(['Tags.name IN' => $tagNames]); but your way is more expressive? |
# |
Jan 2nd 2019, 22:05 |
ricksaccous |
is it working? lell |
# |
Jan 2nd 2019, 22:03 |
phantomwatson |
I get mixed up about when the anonymous functions passed into query-builder stuff take a `Query` object as a parameter, or `QueryExpression`, or both. |
# |
Jan 2nd 2019, 22:01 |
phantomwatson |
Is this a dumb way to go about this, or is this the correct way to mix `matching()` and `in()`? ``` return $query->matching('Tags', function (Query $q) use ($tagNames) { return $q->where(function (QueryExpression $exp) use ($tagNames) { return $exp->in('Tags.name', $tagNames); }); }); ``` |
# |
Jan 2nd 2019, 16:53 |
dereuromark |
none of my comments were adressed to you btw :slightly_smiling_face: just general remarks |
# |
Jan 2nd 2019, 16:52 |
challgren |
I do have some refactoring I have to do but that will just be 1 step closer to being used with different electric companies |
# |
Jan 2nd 2019, 16:52 |
slackebot |
easily upgrade to the next version of Cake and its tested will make it that much better |
# |
Jan 2nd 2019, 16:52 |
challgren |
Yeah nah Im going for real goals now that the base is flexed and I feel confident nothing weird will happen. I’m going to use my current app as an example of quality of code and tests and to better learn the Framework and how to code better. Plus I’m using it for a business use so I’m making money at the same time. Eventually I’m going to sell access to our SaaS with a monthly subscription. And knowing that its written correct and I |
# |
Jan 2nd 2019, 16:47 |
dereuromark |
I am just saying if oyu need to spend 500% of time to get there, then its nonsense and should be avoided :slightly_smiling_face: also means x00% of refactor time every change then and the benefit then is not there, compared to the time invested (if time is in collelation to money, which it usually is for us) |
# |
Jan 2nd 2019, 16:46 |
dereuromark |
if you get it for free (no additional time) thats great. |
# |
Jan 2nd 2019, 16:44 |
challgren |
Main goal was to make it easy to find deprecations and not rely on errorLevel E_ALL and ~E_DEPRECATION when testing so any deprecation will cause a failure that will force me to fix it |
# |
Jan 2nd 2019, 16:43 |
rrd564 |
and perhaps no error messages at all |
# |
Jan 2nd 2019, 16:42 |
challgren |
2013 lines of code and only 390 tests and 890 assertions. |
# |
Jan 2nd 2019, 16:42 |
rrd564 |
@dereuromark the browser? I tested with google chrome and firefox with same results |
# |
Jan 2nd 2019, 16:41 |
challgren |
Lol yep, I do not do enough assertions |
# |
Jan 2nd 2019, 16:40 |
dereuromark |
same reason 100% coverage is crap in most cases^^ |
# |
Jan 2nd 2019, 16:40 |
dereuromark |
the trick is to find a balance, as always, in life. |
# |
Jan 2nd 2019, 16:39 |
dereuromark |
well, its true. both extremes are crappy ideas. |
# |
Jan 2nd 2019, 16:39 |
ricksaccous |
*thinking about stupid jokes, keeps them in his own head* |
# |
Jan 2nd 2019, 16:39 |
ricksaccous |
strange that they decidedly used the acronym CRAP |
# |
Jan 2nd 2019, 16:38 |
dereuromark |
its free (only kills a few trees somewhere each time): https://opnsrce.github.io/how-to-read-and-improve-the-c-r-a-p-index-of-your-code |
# |
Jan 2nd 2019, 16:38 |
slackebot |
<challgren> |
# |
Jan 2nd 2019, 16:38 |
dereuromark |
see google :slightly_smiling_face: |
# |
Jan 2nd 2019, 16:37 |
ricksaccous |
what is a CRAP index? |
# |
Jan 2nd 2019, 16:37 |
dereuromark |
is it possible that the browser triggers a change here? you should debug it using xdebug and stepping through, if there are any unexpected code paths it takes. |
# |
Jan 2nd 2019, 16:36 |
challgren |
Whats the ideal CRAP index for a CakePHP app? |
# |
Jan 2nd 2019, 16:35 |
rrd564 |
the po file is readable for all |
# |
Jan 2nd 2019, 16:35 |
rrd564 |
in any of the view I18n::getLocale() gives me the one what I set up in app.php |
# |
Jan 2nd 2019, 16:34 |
rrd564 |
On the same machine I have a few CakePHP 3.6 projects where the translations are working fine |
# |
Jan 2nd 2019, 16:33 |
rrd564 |
I have tried a fresh cake3.7 project, by just changing the default home, and I tried with a full project, none of them gives me any translations |