oaugustus / direct-silex-provider

ExtDirect Extension to Silex Micro-framework
MIT License
1 stars 0 forks source link

[QUESTION] ExtJs 6 compatibility #2

Open rixbeck opened 8 years ago

rixbeck commented 8 years ago

Hello, I'm just right before a big step of an application upgrade from ExtJs 3 to 6 with a full backend refactoring to Silex. While I can't see now whether if any changes happened in Direct API just wanna ask you how do you feel, is your provider compatible with version 6?

thanks

oaugustus commented 8 years ago

Hi Rixbeck,

I'm not sure about compatibility with version 6, the last version I use it is in the version 4.2. But, according ExtJS Guides there are a diference:

varName 6.0.0 default value is “Ext.app.REMOTING_API” 6.0.1 default value is “Ext.REMOTING_API”

then in Direct\Api.php the method:

/* * Get the ExtDirect Api response Remoting descriptor. * @return string; */ public function getRemoting() { $apiStr = sprintf("Ext.app.REMOTING_API =%s;", $this); $response = new Response($apiStr); // set the response header $response->headers->set('Content-Type', 'text/javascript'); // return the response return $response; }

should be changed to:

/* * Get the ExtDirect Api response Remoting descriptor. * @return string; */ public function getRemoting() { $apiStr = sprintf("Ext.REMOTING_API =%s;", $this); $response = new Response($apiStr); // set the response header $response->headers->set('Content-Type', 'text/javascript'); // return the response return $response; }

Hope it help you.

rixbeck commented 8 years ago

Thank you! I'll give a try then!