Vscode-intelephense: CodeIgniter - Undefined function 'redirect'.intelephense(1010)

Created on 10 Mar 2020  路  8Comments  路  Source: bmewburn/vscode-intelephense

Suddenly, PHP Intelephense started marking this errors:
Undefined type 'CI_Controller'.intelephense(1009)
Undefined function 'redirect'.intelephense(1010)
Undefined function 'get_instance'.intelephense(1010)
(...)

All this functions are from CodeIgniter and they exists in the framework.
Tested on various codeigniter projects I have and the same result.
This was not happening before and I've not installed other PHP extensions

image

Platform and version
MACOs, VSCode February 2020 (version 1.43), PHP Intelephense v 1.3.11

Most helpful comment

Does ctrl + shift + p -> Index workspace fix it?

All 8 comments

Does ctrl + shift + p -> Index workspace fix it?

Not really. I've tested that option, and for 4 or 5 seconds everything looks ok, but after those seconds it returns again with those error notations. Without leaving the same document. Weird...

And the definitions are definitely in the workspace folder? Could they be excluded by files.exclude? For some reason these definitions are not being found and are not indexed.

Sorry, @bmewburn , your are right. The problem was with files.exclude.
It's working fine now if I remove the system folder from the files.exclude, where all the base classes are.
Sorry for issue and congrats for this amazing extension.

Sorry, @bmewburn , your are right. The problem was with files.exclude.
It's working fine now if I remove the system folder from the files.exclude, where all the base classes are.
Sorry for issue and congrats for this amazing extension.

what do you mean remove the system folder from the files.exclude..? could you teach me?

I have the same problem but cannot find that files.exclude or how to fix it, can someone help me with teh issue ?

Does ctrl + shift + p -> Index workspace fix it?

Thanks this solve my problem too :D

ctrl + shift + p -> Index workspace it works and fixed intelephense(1010) yeheyyyyy

Was this page helpful?
0 / 5 - 0 ratings

Related issues

usrnm-nk picture usrnm-nk  路  3Comments

nn-hh picture nn-hh  路  3Comments

swashata picture swashata  路  3Comments

umpirsky picture umpirsky  路  4Comments

zlianon picture zlianon  路  3Comments