# |
Jun 22nd 2018, 12:52 |
saeideng |
there are a issue on github you can see redirect idea there |
# |
Jun 22nd 2018, 12:51 |
erwane |
i should check response in ALL method before ? |
# |
Jun 22nd 2018, 12:51 |
saeideng |
yes |
# |
Jun 22nd 2018, 12:51 |
saeideng |
aha you can check header in main method |
# |
Jun 22nd 2018, 12:51 |
erwane |
`return $this->response->withStatus(404);` no ? |
# |
Jun 22nd 2018, 12:50 |
saeideng |
` return $response ` == `$response->stop();` |
# |
Jun 22nd 2018, 12:50 |
erwane |
if i return $response, the code will continue on $this->methodShouldNotBeCalledIfInputFail(); |
# |
Jun 22nd 2018, 12:50 |
saeideng |
just `return $response ` |
# |
Jun 22nd 2018, 12:49 |
saeideng |
what you need now ? redirect ? |
# |
Jun 22nd 2018, 12:49 |
saeideng |
I said before `send` is a multi operand method :slightly_smiling_face: |
# |
Jun 22nd 2018, 12:49 |
erwane |
Juste redirect and stop now |
# |
Jun 22nd 2018, 12:48 |
erwane |
that's my problem. What is the equivalent now to do same things |
# |
Jun 22nd 2018, 12:48 |
erwane |
EXACTLY ;) |
# |
Jun 22nd 2018, 12:48 |
saeideng |
stop / send unavailable now :slightly_smiling_face: |
# |
Jun 22nd 2018, 12:47 |
erwane |
Before 3.4.0 we wrote things like that ```php |
# |
Jun 22nd 2018, 12:47 |
saeideng |
in this case you no need to transfer all the controllers to `api/v3` |
# |
Jun 22nd 2018, 12:47 |
saeideng |
@denis instead of `prefix` you can use `scope` |
# |
Jun 22nd 2018, 12:43 |
erwane |
Hi all |
# |
Jun 22nd 2018, 12:35 |
LubosR |
https://gist.github.com/LubosRemplik/f85cf696512f69fdcc8d5b0255c09aee just so you see what I mean, each matching works as expected and I need them in logical OR |
# |
Jun 22nd 2018, 12:31 |
LubosR |
Maybe I am lost in ORM and do not thing in SQL, but I have custom finder where i need to use 2x matching and using OR operator. Any hint? |
# |
Jun 22nd 2018, 11:34 |
santiago17 |
:) |
# |
Jun 22nd 2018, 11:34 |
santiago17 |
I solved it, I was using vagrant and sharing the same folder I am using for the app in the VM and in the vagrant file it was set the permission to 775 so it did not allow me to overwrite those under the ubuntu cli |
# |
Jun 22nd 2018, 11:31 |
denis |
it's easier than spoiling the magical configurations of IMHO |
# |
Jun 22nd 2018, 11:30 |
denis |
ok thank you I will do as I wrote above, and after the migration I will transfer all the controllers to api/v3 |
# |
Jun 22nd 2018, 11:28 |
neon1024 |
Although that whole thing seems to be a topic of debate |
# |
Jun 22nd 2018, 11:28 |
neon1024 |
Harder to add more versions later though |
# |
Jun 22nd 2018, 11:27 |
saeideng |
` $routes->prefix('api/v3'` this worsks when you have app in root |
# |
Jun 22nd 2018, 11:27 |
flavius |
File uploaded https://cakesf.slack.com/files/U75U0UMR9/FBD7A3GP8/image.png / https://slack-files.com/T053DPNCM-FBD7A3GP8-2f67e315c3 - how am i supposed to test constants? I cant just undefine them unless i install some pecl "runkit" package |
# |
Jun 22nd 2018, 11:26 |
neon1024 |
Well, no, if you’re migrating the app, your Cake 3 app will still want the prefixes in right, so you can add more stuff in later |
# |
Jun 22nd 2018, 11:26 |
neon1024 |
That is what I would try and achieve, yes |
# |
Jun 22nd 2018, 11:26 |
denis |
in cake3 app all controllers placed in Controllers/blalala |
# |
Jun 22nd 2018, 11:25 |
denis |
@neon1024 Do I understand correctly? I put two applications in different folders and setting up locations in nginx? example.com -> cake2/webroot exampre.com/api/v3 -> cake3/webroot correct? |
# |
Jun 22nd 2018, 11:23 |
neon1024 |
At least with a webserver management you can migrate parts of the application a url at a time almost |
# |
Jun 22nd 2018, 11:22 |
neon1024 |
Trying to run a cake app inside a cake app would be kinda hard, especially between versions |
# |
Jun 22nd 2018, 11:22 |
neon1024 |
I would create two applications on the filesystem and switch them by url in the web server configuration |
# |
Jun 22nd 2018, 11:20 |
denis |
but this not work if i place this in subfolder location |
# |
Jun 22nd 2018, 11:19 |
denis |
this work as well |
# |
Jun 22nd 2018, 11:19 |
denis |
File uploaded https://cakesf.slack.com/files/U9CTK11C3/FBC3BPQLU/my_router.php / https://slack-files.com/T053DPNCM-FBC3BPQLU-6b1fcff862 |
# |
Jun 22nd 2018, 11:18 |
denis |
i migrate old to new but all applications must wors side-by-side |
# |
Jun 22nd 2018, 11:11 |
neon1024 |
I never liked the look of the code with `->where(['example IS NOT NULL'])` |
# |
Jun 22nd 2018, 11:10 |
neon1024 |
Thanks to whoever put in `->whereNotNull()` <3 |