Elephactor keeps PHP class moves and renames in sync with the Elephactor CLI. When a PHP file is renamed or moved in VS Code, the extension asks the CLI to update class declarations and references while skipping the physical file operation that VS Code already performed.
The extension also contributes the Elephactor: Install Elephactor command, which installs tim-lappe/elephactor into the nearest Composer project.
Getting started
Install dependencies:
npm install
Build once or start watch mode:
npm run compile
# or
npm run watch
Press F5 in VS Code to launch an Extension Development Host, then move or rename a PHP class file in a Composer project.
Available scripts
npm run compile compiles the TypeScript sources into dist.
npm run watch keeps the compiler running for iterative development.
npm run check performs a no-emit type check.
npm run test executes the extension tests via @vscode/test-cli.
npm run package creates a .vsix artifact using @vscode/vsce.
Extension structure
src/extension.ts: activation entry point and disposable registration.