# |
Jul 21st 2017, 09:38 |
neon1024 |
As it’s `withStatus()` :P |
# |
Jul 21st 2017, 09:37 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Http/Response.php#L924 |
# |
Jul 21st 2017, 09:37 |
neon1024 |
Well, we’re all wrong! |
# |
Jul 21st 2017, 09:37 |
littleylv |
`$this->response = $this->response->withStatusCode(200)` will be ok |
# |
Jul 21st 2017, 09:36 |
neon1024 |
Well it looks like the constructor takes the options, https://github.com/cakephp/cakephp/blob/master/src/Http/Response.php#L432 |
# |
Jul 21st 2017, 09:36 |
hmic |
return $this->response->withStatusCode(200); should be it |
# |
Jul 21st 2017, 09:36 |
neon1024 |
Let’s check the source code! |
# |
Jul 21st 2017, 09:35 |
neon1024 |
`$response = new Response(); $response = $response->withStatusCode(200); return $response` |
# |
Jul 21st 2017, 09:35 |
neon1024 |
No. |
# |
Jul 21st 2017, 09:35 |
awi |
so just use return $this->response->statusCode(200); ? |
# |
Jul 21st 2017, 09:34 |
neon1024 |
Given away because the method is a ‘with’ method |
# |
Jul 21st 2017, 09:34 |
neon1024 |
Responses are immutable if I remember rightly. So you’ll need to assign the return of any methods you call |
# |
Jul 21st 2017, 09:33 |
awi |
how do I return a 200 OK from Controller? $this->response->withStatusCode(200) doesnt seem to do the job. |
# |
Jul 21st 2017, 09:32 |
neon1024 |
(shrug) |
# |
Jul 21st 2017, 09:32 |
neon1024 |
https://www.sitepoint.com/run-multiple-versions-php-one-server/ |
# |
Jul 21st 2017, 09:32 |
neon1024 |
Google is producing lots of results for multiple versions of php :slightly_smiling_face: |
# |
Jul 21st 2017, 09:31 |
neon1024 |
Perhaps there is a project like RVM for PHP which allows multiple versions? We have that on our CPanel server, you can pick your PHP version on a per project basis, so it must be possible |
# |
Jul 21st 2017, 09:08 |
ono-t |
Using another web server(apache/nginx etc.) in one computer. |
# |
Jul 21st 2017, 09:06 |
sonu_nk |
i think its possible with php.ini ..but i never did not before |
# |
Jul 21st 2017, 09:04 |
sonu_nk |
can i run php5 for one cake project and php7 for another cake project on same server ? |
# |
Jul 21st 2017, 09:03 |
sonu_nk |
sorry 5.6 and i have 5.5 php |
# |
Jul 21st 2017, 09:03 |
sonu_nk |
ah ..new version require php 7 |
# |
Jul 21st 2017, 09:00 |
neon1024 |
Oh wait, you said you’re already on 1.4.2, I guess you just need `composer update` then to update your installed vendors to the latest release allowed by your composer constraints |
# |
Jul 21st 2017, 09:00 |
sonu_nk |
seems php composer.phar require "cakephp/cakephp:3.4.*" is working |
# |
Jul 21st 2017, 08:59 |
neon1024 |
`composer selfupdate` |
# |
Jul 21st 2017, 08:57 |
sonu_nk |
s/from/to |
# |
Jul 21st 2017, 08:57 |
sonu_nk |
i am trying to update CakePHP v3.3.16 from lastest version. i also changed my "cakephp/cakephp": "~3.4", but still composer says You are already using composer version 1.4.2 (stable channel). |
# |
Jul 21st 2017, 08:46 |
maymeow |
@admad i heard this sometimes before |
# |
Jul 21st 2017, 08:45 |
admad |
@maymeow find a new boss :slightly_smiling_face: |
# |
Jul 21st 2017, 08:44 |
hmic |
docker is just fine |
# |
Jul 21st 2017, 08:44 |
maymeow |
@admad tell this to my boss :) |
# |
Jul 21st 2017, 08:44 |
neon1024 |
Heya @birdy247 :wave::skin-tone-2: |
# |
Jul 21st 2017, 08:43 |
maymeow |
@hmic ill try it :slightly_smiling_face: now im using docker for development |
# |
Jul 21st 2017, 08:43 |
admad |
containerize everything! |
# |
Jul 21st 2017, 08:43 |
hmic |
using virtualbox is way easier though and i dont see why you would not want to go with it at all, as it's work is done behind the scenes completely |
# |
Jul 21st 2017, 08:42 |
hmic |
maymeow: sure! just make vagrant use hyper-v instead of virtualbox |
# |
Jul 21st 2017, 08:42 |
hmic |
+1 for using cakebox, as it is a controlled and known environment, way more than the linux subsystem on windows |
# |
Jul 21st 2017, 08:42 |
maymeow |
@dereuromark it will run under Hyper-V? |
# |
Jul 21st 2017, 08:41 |
hmic |
still you need to enable the windows dev mode before you can install it - i think this is the problem. with this gone, any installer could just require it's dependency and install it right away... (like .net) |
# |
Jul 21st 2017, 08:41 |
dereuromark |
I would except the windows people to use the cakebox :slightly_smiling_face: That would also solve the issue, even a bit more clean. |
# |
Jul 21st 2017, 08:41 |
sonu_nk |
any help for my question ? |