# |
Apr 21st 2017, 13:55 |
admad |
heh |
# |
Apr 21st 2017, 13:54 |
Neon1024 |
Yes, true admad, but we’re not all as clever as you :p |
# |
Apr 21st 2017, 13:54 |
admad |
better to whip up some custom routing or controller dispatching, so that you only need to extends those endpoints which actually need some change |
# |
Apr 21st 2017, 13:54 |
Neon1024 |
But it kinda does the same thing as an entity mutator |
# |
Apr 21st 2017, 13:54 |
Neon1024 |
I did look at phpleague/fractal |
# |
Apr 21st 2017, 13:54 |
birdy247 |
that bit confused me a little |
# |
Apr 21st 2017, 13:54 |
Neon1024 |
I ended up using a pretty big entity mutator method to change the data structure |
# |
Apr 21st 2017, 13:54 |
birdy247 |
Neon1024 what dd you use to change the josn structure? |
# |
Apr 21st 2017, 13:53 |
Neon1024 |
v4 really was just a change in json structure |
# |
Apr 21st 2017, 13:53 |
Neon1024 |
Yeah agreed, I had a tough time trying to decide how to do it |
# |
Apr 21st 2017, 13:53 |
admad |
yeah, that's not something i would like :slightly_smiling_face: |
# |
Apr 21st 2017, 13:53 |
Neon1024 |
Most are empty mind you |
# |
Apr 21st 2017, 13:52 |
Neon1024 |
For each endpoint, yes |
# |
Apr 21st 2017, 13:52 |
admad |
of course but that still required creating class file for every controller in v4 isnt it? |
# |
Apr 21st 2017, 13:52 |
Neon1024 |
Then when I deprecate v3, I can drop the extension |
# |
Apr 21st 2017, 13:52 |
Neon1024 |
So I can selectivly overload methods as I need |
# |
Apr 21st 2017, 13:52 |
Neon1024 |
class ApiAppController extends Apiv3AppController |
# |
Apr 21st 2017, 13:52 |
Neon1024 |
use App\Controller\Api\V3\ApiAppController as Apiv3AppController; |
# |
Apr 21st 2017, 13:52 |
Neon1024 |
I extend |
# |
Apr 21st 2017, 13:51 |
admad |
*wasteful |
# |
Apr 21st 2017, 13:51 |
admad |
Neon1024: how do you handle routing for case where you just needs changes to say one controller for v4 but rest stay same as v3. Would be waste to create all new controller for v4 |
# |
Apr 21st 2017, 13:49 |
Neon1024 |
So v4 has different response structure and etc |
# |
Apr 21st 2017, 13:49 |
Neon1024 |
I’ve recently had to redo all the json output though |
# |
Apr 21st 2017, 13:49 |
Neon1024 |
So I used the json listener and it works okay |
# |
Apr 21st 2017, 13:49 |
Neon1024 |
Unfortunatly bravo-kernels excellenet jsonapi listener wasn’t done when I started |
# |
Apr 21st 2017, 13:49 |
birdy247 |
Im on this :slightly_smiling_face: |
# |
Apr 21st 2017, 13:48 |
Neon1024 |
Yep |
# |
Apr 21st 2017, 13:47 |
birdy247 |
Neon1024 did you just use crud for your API? |
# |
Apr 21st 2017, 13:47 |
Neon1024 |
birdy247, Not sure it’s recorded |
# |
Apr 21st 2017, 13:45 |
admad |
would have gotten a lot more tickets if it didnt work with config shown in readme |
# |
Apr 21st 2017, 13:45 |
awi |
hi. Is there a datasource for couchbase in cakephp3? |
# |
Apr 21st 2017, 13:45 |
birdy247 |
slide 12 is the ticket :slightly_smiling_face: |
# |
Apr 21st 2017, 13:45 |
admad |
don't think anything has changed in 3.4 to cause problem |
# |
Apr 21st 2017, 13:45 |
birdy247 |
I need to get on crud! |
# |
Apr 21st 2017, 13:45 |
Neon1024 |
inorite! |
# |
Apr 21st 2017, 13:45 |
birdy247 |
Neon1024 thats ace |
# |
Apr 21st 2017, 13:44 |
hmic |
i do have an empty initialize in the controller just calling parent::initialize |
# |
Apr 21st 2017, 13:44 |
admad |
it's supposed to work |
# |
Apr 21st 2017, 13:44 |
admad |
please debug and let me know why it doesn't work :slightly_smiling_face: |
# |
Apr 21st 2017, 13:43 |
hmic |
admad: but it does not work if specified at all. no auth at all is done with it in place! *or* i am doing something terribly wrong |
# |
Apr 21st 2017, 13:42 |
Neon1024 |
birdy247, Perhaps see my Cakefest talk? https://www.slideshare.net/davidyell/how-i-built-web-services-in-cakephp :p </pimp> |