# |
Jun 22nd 2018, 12:57 |
narendravaghela |
:thumbsup: |
# |
Jun 22nd 2018, 12:57 |
saeideng |
:+1: |
# |
Jun 22nd 2018, 12:57 |
erwane |
understood |
# |
Jun 22nd 2018, 12:57 |
saeideng |
>response object is immutable yes but no for `send();` or `stop();` |
# |
Jun 22nd 2018, 12:56 |
saeideng |
`$response->send()` is like hard sending response and it is not flexible |
# |
Jun 22nd 2018, 12:54 |
saeideng |
you need see response in middleware |
# |
Jun 22nd 2018, 12:54 |
erwane |
PSR is strange :S |
# |
Jun 22nd 2018, 12:54 |
saeideng |
no it not logical now |
# |
Jun 22nd 2018, 12:53 |
erwane |
it's look logical |
# |
Jun 22nd 2018, 12:53 |
erwane |
why $response->send() disappear ? |
# |
Jun 22nd 2018, 12:53 |
saeideng |
there are some idea here https://github.com/cakephp/cakephp/issues/11197 |
# |
Jun 22nd 2018, 12:53 |
narendravaghela |
response object is immutable |
# |
Jun 22nd 2018, 12:52 |
saeideng |
because you must return a response |
# |
Jun 22nd 2018, 12:52 |
saeideng |
no there is not |
# |
Jun 22nd 2018, 12:52 |
erwane |
there is no way to stop execution and send response now ? |
# |
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 |