impact_of
Find what breaks before you change a PHP class or method: dependent classes, callers, implementations, routes, and tests, nearest first with relations and confidence.
Instructions
Call this before changing a class or a method, instead of searching for its usages with grep. What may break when it changes: every class that depends on it, directly or through others (callers, subclasses, implementations, code that instantiates or references it, senders and handlers of a message), nearest first, each with the relation that reaches it and the weakest confidence on the way, then its methods reaching the change with the source lines of their calls. Follows methods, not whole classes: a class is reached only through the methods that use the change. Also reaches the callers of the interface or parent method a method implements (INFERRED), and, in a separate list, the code possibly affected through the state the method writes. Lists the tests to run apart, found through test helpers (fakers). Stops at a service receiving the change among others (a tagged collection) and at inherited code shared with other subclasses, which are listed but not followed. Lists the routes reaching the change, each with its chain down to the change. A large impact comes compact (routes cut, farther classes by name, indirect tests counted) and still names every direct dependent: the default answer is the one to use, other options are several times larger.
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": {
"name": "<name>"
},
"name": "impact_of"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Short or fully qualified name, Class::method, route (POST /orders), channel or API operation; service@Name in a multi-service repository. | |
| depth | No | How many relations away to follow (default 3). | |
| limit | No | Entries per list (default 40). Leave it out. | |
| format | No | Leave it out: text (default). full spells out every relation, about 5 times larger; json for scripts. | |
| section | No | Only one list, uncut. |