Rephactor is an excellent PHP reconstruction tool. The PHP framework can be a single entry, fully object-oriented, and fully class-based MVC mode. However, we are faced with a lot of old code, or even new code, which is not fully compatible with the PHP Framework. it can be a single entry, fully object-oriented, and fully class-based MVC mode. However, we are faced with a large number of old code, or even new code, not completely in line with the object-oriented principle, in line with the design pattern. Small applications. However, in the face of large applications, it must be a great deal of pain !!
What should I do? Many people will always face all this, and PHP code needs to be reconstructed. (Of course, if you can understand what I said, you must have read the book Refactoring-improving design of existing code)
Look at this link: http://zh-cn.w3support.net/index.php? Db = so & id = 100876 we can understand the pain of refactoring! This is inevitable. But how can this pain be made lighter?
Refactoring tools are required. Fortunately, now we have the PHP refactoring tool-rephactor. It is indeed a very good tool. (Of course, you must remember that there has never been a fully automated reconstruction tool, and machines can never replace the human brain. all reconstruction goals, and each step still requires you to follow the instructions in refactoring-improving the design of existing code !)
So: what does rephactor provide to us?
- Ensure that refactoring is reversible-once a problem is found, the code is reversible and can be traced back to the previous version.
- Find and replace functions-common search replacement, method rename, class rename, and regular expression mode replacement.
- After all the operations are completed, the test is based on SimpleTest Aperiplus and the test coverage is ensured.
- Integrate Phemto to ensure the test of class relevance.
Of course, it has some restrictions and can only run on LINUX, and only supports PHP5.2
Interested? With it, your refactoring will be greatly accelerated, and there will be no new bugs.
Official website: http://rephactor.sourceforge.net/
Why not install one?
Bytes. However, we face a lot of old code, or even new code, it is not completely in line...