Phpactor is an intelligent code-completion and refactoring tool for PHP.
- Code Completion: Provides broad and accurate context aware code completion.
- No indexing: Phpactor works in real-time and is optimized with composer. It is fast.
- Introspection: Jump to class and method definitions, find references.
- Refactoring: Move classes, complete constructors, implement contracts, generate methods, etc.
- Native VIM plugin: Lightweight VIM plugin.
- CLI interface: Most/some functionality is exposed through CLI commands.
Phpactor can be used in a limited way as a standalone application, but its full power can only be utilized through its RPC protocol. It ships with support for VIM and there is also a plugin for Emacs.
Phpactor is pronounced "factor", as in "factorisation" and "re-factoring". It is a large project and some parts are more fully realised than others but it is used as an essential tool in day-to-day PHP work.
Phpactor is made up of a few different packages:
- phpactor/class-mover: Find and update class references.
- phpactor/class-to-file: Convert files to class names and vice-versa.
- phpactor/code-builder: Library for creating and idempotently updating source code.
- phpactor/code-transform: Transform code.
- phpactor/completion: Completion library.
- phpactor/path-finder: Simple for file relationships when they share common path segments.
- phpactor/source-code-filesystem: Manage source code trees.
- phpactor/test-utils: Shared test utilities for Phpactor
- phpactor/worse-reflection: Static source reflection library.
Phpactor stands on the shoulders of some other packages:
- Couscous: This documentation is generated with Couscous.
- Jetbrains PhpStorm Stubs: Built in PHP classes are supported through this stub collection from PhpStorm.
- PHPBench: For tracking performance.
- PHPUnit: The de facto standard PHP test framework
- Symfony: The command line application is built with the Symfony console component.
- Tolerant PHP Parser: Large parts of Phpactor are integrated with the TPP.
- BetterReflection: Phpactors reflection API was heavily influenced by this library.
- Language Server Protocol: While not implementing the LSP, some terminology has been borrowed from it.
- Nikic PHP Parser: The original Phpactor used this before switching to TPP.
- PHP Language Server: An LSP implementation for PHP.