Robin71
Robin71

Reputation: 403

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

Upvotes: 2

Views: 1803

Answers (2)

M Ashraful A
M Ashraful A

Reputation: 637

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.

Upvotes: 12

user719662
user719662

Reputation:

As @Nishchal Gautam mentioned in his comment, https://plugins.jetbrains.com/plugin/9536-phalcon-auto-complete does exactly this in a more manageable way than downloading the devtools, adding the needed includes by hand in every project etc.

Upvotes: 0

Related Questions