PHP introspection tool and code completion tool.
./bin/phpactor complete 493 lib/Complete/ScopeFactory.phpAbove it will try and find possible autocompletions at bye offet 493 of the given file. You can also provide source via. stdin:
cat ScopeFactory.php | ./bin/phpactor complete 493- Uses BetterReflection to introspect files via. Composer. No indexing required! (when the context is known)...
- Otherwise it uses a simple class => path hash (f.e. when completing
neworusestatements (both of which have yet to be implemented)). - Can infer property types from docblock annotations.
- Resolves variable types.
- Resolves chained object calls (providing return / parameter types are supplied).
- Simple omni complete VIM plugin (use it with YouCompleteMe
- Only works for class scopes.
- Requires composer.
Because VIM hasn't got a good introspection / autocomplete tool.
- Copy (or better, symlink)
plugin/vim/autoload/phpactor.vimto~/.vim/autoload/phpactor.vim. - Set the omni-complete function to phpactor in your
.vimrcand configure the path tophpactor:
set omnifunc=phpactor#complete
let g:phpactor#phpactor_path="/home/daniel/www/dantleech/phpactor/bin/phpactor"
- A YouCompleteMe plugin, which will probably be much better than the omifunc completion in VIM.
- Include use statement (currently covered by majutsushi/tagbar.
- Jump to class.
- Padawan: Looks very capable and cool, but was pretty unstable last time I checked.
- Atoms PHP integration: Provides a PHP executable command to introspect code, but I really couldn't figure out how it worked.