Replies: 1 comment 1 reply
-
|
I'd have to see this in action. My experience with GPT and Rector is poor, as there is not much learning material and AST is precision work. How far are you from making a proof of concept to try out? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes I wonder if it would make sense to have a Rector MCP server, that is able to perform refactoring initiated by AI's.
Sure, an AI can try to create a
rector.phpfile and then run it. But I imagine it takes a few times before it gets it right. If we would expose all the built-in Rector's as tools, it might make it easier.I noticed that Rector is no longer allowing for class rename refactoring:
But when we have an MCP server, it might make a lot of sense to let Rector handle this.
You could ask the AI to move a certain class to a new namespace. It would then refactor the whole codebase, by triggering a Rector rename MCP tool, that would find all the usages and update it. And even also update the related unit test, and move that too.
Did others think about this type of usage as well? Or is this a bad example for MCP?
Beta Was this translation helpful? Give feedback.
All reactions