# |
Jul 21st 2017, 18:39 |
genellern |
You can set your connection with --connection test, but it's not required unless you have something that's not in your fixtures |
# |
Jul 21st 2017, 18:38 |
dereuromark |
most dont, because they use fixtures which auto create everything all the time |
# |
Jul 21st 2017, 18:37 |
ericadeefox |
can't tell if this is a dumb question or not: how to run a migration on a testing database? |
# |
Jul 21st 2017, 18:24 |
savant |
no problem |
# |
Jul 21st 2017, 18:21 |
swimboy |
s the sound of my head hitting the wall. Thank you @savant |
# |
Jul 21st 2017, 18:21 |
swimboy |
BANG! BANG! BANG! That |
# |
Jul 21st 2017, 18:20 |
savant |
https://book.cakephp.org/3.0/en/orm/query-builder.html#advanced-conditions |
# |
Jul 21st 2017, 18:19 |
swimboy |
That’s just it, I don’t know where or how to put an “or statement”. All I’ve found is the ->union() method for a query, and it seems to recurse indefinitely when I try to use it. |
# |
Jul 21st 2017, 18:18 |
savant |
why not just write the or statement out? |
# |
Jul 21st 2017, 18:18 |
savant |
ah |
# |
Jul 21st 2017, 18:14 |
swimboy |
These two finders find records from the same table by two orthogonal criteria. I want a single finder that will find all records that qualify by either criterion. |
# |
Jul 21st 2017, 18:13 |
savant |
and what do you mean by “union” |
# |
Jul 21st 2017, 18:11 |
swimboy |
https://pastebin.com/VYrZm5cY |
# |
Jul 21st 2017, 18:10 |
savant |
@swimboy might help to see the finders |
# |
Jul 21st 2017, 18:00 |
swimboy |
I have two relatively simple finder methods, and I’m trying to create a third method that finds the union of the first two. I’m missing something because everything I try complains that my query has hit the recursion limit. Can anybody steer me in the right direction for this? |
# |
Jul 21st 2017, 17:57 |
eax |
Thanks admad! |
# |
Jul 21st 2017, 17:56 |
admad |
eax: https://github.com/cakephp/app/blob/master/src/Console/Installer.php#L113 |
# |
Jul 21st 2017, 17:54 |
eax |
admad: Which permissions exactly? |
# |
Jul 21st 2017, 17:53 |
admad |
fix the permissions |
# |
Jul 21st 2017, 17:52 |
eax |
Hey folks - I am getting: Script App\Console\Installer::postInstall handling the post-install-cmd event terminated with an exception [ErrorException] mkdir(): Permission denied - When I try to update my Cake3 project through Composer - Anyone know how to solve this? |
# |
Jul 21st 2017, 17:13 |
nemmons |
more or less, yeah. |
# |
Jul 21st 2017, 16:55 |
Alex__ |
ok, models have changed a lot. Do most of the methods that used to go into model now go into table? |
# |
Jul 21st 2017, 16:36 |
admad |
i think it's currently broken but you can fix it :slightly_smiling_face: |
# |
Jul 21st 2017, 16:35 |
admad |
@viraj.khatavkar https://github.com/cakephp/codeception |
# |
Jul 21st 2017, 16:35 |
viraj.khatavkar |
Because it would do an actual HTTP request? |
# |
Jul 21st 2017, 16:35 |
viraj.khatavkar |
But will the above thing work with Codeception then? |
# |
Jul 21st 2017, 16:34 |
admad |
everything is done within same process |
# |
Jul 21st 2017, 16:34 |
nemmons |
okay that makes sense, thanks admad |
# |
Jul 21st 2017, 16:34 |
admad |
s/not/no |
# |
Jul 21st 2017, 16:33 |
jeremyharris |
also, alias requires two params |
# |
Jul 21st 2017, 16:33 |
admad |
also there's not actual http request |
# |
Jul 21st 2017, 16:33 |
admad |
there's no separate thread :slightly_smiling_face: |
# |
Jul 21st 2017, 16:33 |
nemmons |
oh unless the post method isn't actually making a separate HTTP request but just generating a new request object in the same execution context |
# |
Jul 21st 2017, 16:30 |
nemmons |
in relation to Viraj's question above - say in a test i do something like ` ConnectionManager::alias('other_connection'); $this->post('/some/url', $params]);` to test some URL in my application. This shouldn't actually work, because in the new PHP `thread` for executing the post request, the alias as defined above won't be persisted, because it's executing from a separate context. Right? Or am i completely misunderstanding how php works? |
# |
Jul 21st 2017, 16:26 |
Alex__ |
Found it! |
# |
Jul 21st 2017, 16:25 |
admad |
plus we have crud and crud-view plugins ;0 |
# |
Jul 21st 2017, 16:23 |
jeremyharris |
There is! |
# |
Jul 21st 2017, 16:21 |
Alex__ |
Hi, I have a quick question. I haven't used cake in a while, and I haven't used 3 at all. Is there a baking functionality like there is with 2? |
# |
Jul 21st 2017, 16:18 |
jeremyharris |
ah for tests, then yeah the alias approach is probably what you want |
# |
Jul 21st 2017, 16:17 |
viraj.khatavkar |
I don’t want to do it on the Table class because this is a runtime configuration for tests that are to be run in Codeception |
# |
Jul 21st 2017, 16:16 |
jeremyharris |
it might be better to overwrite getDefaultConnection on your table class, add a setDefaultConnection, and do it that way. Would probably be more clear to understand |