phpactor_move_class
Move a PHP class file, update its namespace, and automatically refactor all project-wide references. Writes directly to disk – commit your work first.
Instructions
Move/rename a PHP class: moves the file, updates the namespace declaration, AND updates all references project-wide. This is the tool for full class renames. WARNING: Writes directly to disk — commit your work first!
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"sourcePath": "<sourcePath>",
"destPath": "<destPath>"
},
"name": "phpactor_move_class"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| destPath | Yes | Absolute path to the destination PHP file | |
| sourcePath | Yes | Absolute path to the source PHP file | |
| projectPath | Yes | Absolute path to the PHP project root |