Search code examples
phpcakephpcakephp-2.0phpstorm

PhpStorm code auto completion in CakePHP


I have a controller in CakePHP 2.2 application.
I use PhpStorm 4.0.1 as IDE.

In MyController.php file I declare this:

/**
 * @property MyUtilComponent $MyUtil
 */
  1. Inside my controller, when I write $this-> I can select "MyUtilComponent" from drop down list. enter image description here

  2. But when I write $this->MyUtilComponent-> no function name option comes to select. enter image description here

  3. When I write $this->MyUtil->addThis(); and then click to addThis word and "Go to declaration", then PhpStorm goes to method's declaration successfully.

What should I do more to get function names autocompletion ?

Note: The behaviour is same for the core components.


Solution

  • Update your PHPStorm. Version 5.0.4 is currently released and works the way you want it.