phpactor_rename_member
Renames a PHP method, property, or constant and updates all references project-wide. Type inference ensures only the intended member is renamed, avoiding conflicts with same-named members on other classes.
Instructions
Rename a PHP method, property, or constant and update all references project-wide. Uses type inference to only rename the correct member (not same-named members on other classes).
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>",
"filePath": "<filePath>",
"memberName": "<memberName>",
"memberType": "<memberType>",
"newName": "<newName>"
},
"name": "phpactor_rename_member"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Preview changes without writing to files | |
| newName | Yes | New member name | |
| filePath | Yes | Path to the PHP file containing the class, relative to projectPath | |
| memberName | Yes | Current member name | |
| memberType | Yes | Type of the member | |
| projectPath | Yes | Absolute path to the PHP project root |