Search code examples
phpphpstormphalcon

Phalcon Undefined namespace Phalcon


I'm making project using Phalcon PHP. I've installed Phalcon and Phalcon devtools using instruction from phalconphp.com.

I've created my project successfully, but PhpStorm shows undefined namespace Phalcon. Website works, but there are so many errors in IDE. I'm afraid it should not looks like this.

Have I done any mistakes while installing framework or creating project?

enter image description here


Solution

  • Download or clone phalcon devtools files from github to your local https://github.com/phalcon/phalcon-devtools

    Open PHPstorm, Under the Project file tree find the "External Libraries" right click and select "Configure PHP Include Paths..." click on "+" in the window then select phalcon-devtools/scripts/Phalcon directory from phalcon devtools repo.