Zend Studio, or Eclipse PDT?

Zend Studio, or Eclipse PDT?


  • Total voters
    18
I use coda 2 for mac. Though I think I need to start using an IDE for Xf development as I have to go search all the files for a class I need to use in my addon :(
 
If I had to choose from the poll, ZendStudio, but outside of that, I use PhpStorm both at work and at home.
 
Php storm is available for free with an academic license.

Do you use a plugin for php storm so it better handles xenforos classes?
 
Php storm is free with an academic license.

Do you use a plugin for php storm so it better handles xenforos classes?

I just include the XF files as includes and then for proxy classes, wrap the proxy class definition in a never pass conditional:

PHP:
if (false)
{
class XFCP_Class extends XenForo_Class {}
)

Phpstorm resolves it, and it isn't parsed by PHP so no errors. Hasn't failed me yet :)

(I used to comment out the class def but I had to keep commenting then uncommenting.)

Liam
 
There's always:
PHP:
/** @var XenForo_Model_User $this */

In your method, from after that point, PhpStorm would assume $this to be an instance of XenForo_Model_User.

Similar to:
PHP:
/** @var XenForo_Model_User $userModel */
$userModel = XenForo_Model::create('XenForo_Model_User');
 
There's always:
PHP:
/** @var XenForo_Model_User $this */

In your method, from after that point, PhpStorm would assume $this to be an instance of XenForo_Model_User.

Similar to:
PHP:
/** @var XenForo_Model_User $userModel */
$userModel = XenForo_Model::create('XenForo_Model_User');

That works for $this, but not method override... Which is what I mainly use it for.

Liam
 
PHP:
/** @var XenForo_Model_User $this */

Is that "new" since one or two years? I remember php storm had problems redirecting me to some classes and from my memory $this might have been what didnt work.

Thanks for your explanation, now I know what to do for my own documentation so I can tell my editor how to understand $this.

Liam W, do you put this code on top of the files where proxy classes are used?
 
Is that "new" since one or two years? I remember php storm had problems redirecting me to some classes and from my memory $this might have been what didnt work.

Thanks for your explanation, now I know what to do for my own documentation so I can tell my editor how to understand $this.

Liam W, do you put this code on top of the files where proxy classes are used?

I put it at the bottom of files which use a proxy class. Nice to keep it out of the way :)

Liam
 
Would just like to throw in another vote for PHPStorm. I have been using its litter brother (webstorm) for some basic web dev.
 
Does anyone know if there is a way to tell phpstorm to auto-create {} like
Code:
if (statement)
{
  code
}

... because currently it is doing this
Code:
if (statement) {
  code
}
That would be great!
 
Top Bottom