This forum has been archived. All content is frozen. Please use KDE Discuss instead.

PHP autocompletion

Tags: None
(comma "," separated)
torotil
Registered Member
Posts
6
Karma
0
OS

PHP autocompletion

Mon May 21, 2012 6:12 am
Hi,
I'm searching for a way to get autocompletion to work with my php-projects (namely drupal modules and sites). It seems that auto completion works fine for PHP-core and the current file I'm editing but fails for:
* function/classes declared in other files in the same project
* function/classes declared in other related projects (I've found no way to tell kdevelop what additionally files to index).

Note that my files don't have any include/require statements as drupal cares for including the right files at the right time.

Any suggestions on how to configure kdevelop to work with that?
User avatar
Milian Wolff
KDE Developer
Posts
61
Karma
1
OS

Re: PHP autocompletion  Topic is solved

Mon May 21, 2012 7:34 pm
Regarding drupal: many drupal files don't have the *.php file extension which breaks kdevelop/kmimetypefinder. To "solve" this, go to system settings -> file associations and add the required file extensions (*.inc most notably) to the php mimetype there.

Regarding third party libraries (e.g. from pear or your package manager), you can either open their folders as a separate project, or symlink the required folder into your project. This we need to improve somehow in the future by adding customizable include paths somehow but well - we are not there yet.

cheers


current KDE projects: Quanta, KDevelop, Kate
torotil
Registered Member
Posts
6
Karma
0
OS

Re: PHP autocompletion

Tue Jun 19, 2012 9:13 am
Hi,

sorry - I was too busy to try it until now. thanks for you answer. I now use the "open the complete drupal folder as project"-approach (in addition to adding the file extensions) to get auto-completion in kdevelop.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell