rephactor--Excellent PHP refactoring tools
??????? Starting with PHP5, it provides powerful object-oriented functionality. So that PHP can be fully programmed according to the design pattern. The PHP framework can be a single-entry, fully object-oriented, fully class-based MVC pattern. However, we are faced with a lot of old code, or even new code, does not exactly conform to the object-oriented principle, conforms to the design pattern. Small application is no harm. But if the face of large-scale applications, it is bound to be a big pain!!
??????? What to do? A lot of people are always faced with this, and the PHP code needs to be refactored. (Of course, if you can understand what I'm saying, you must have seen the book "Refactoring-improving the 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 there really is PHP refactoring tool--rephactor. It is indeed a very good tool. (Of course, you have to remember that there is never a completely automated refactoring tool, machines can never replace the human brain, all the refactoring goals, and every step is still to be done in accordance with the "refactoring-improve the design of the existing code" in the book you explain the practice to do! )
??????? So: What does Rephactor offer us?
- Ensure the reversibility of the refactoring-once the problem is found, the code is reversible and can be traced back to the previous version.
- Find and replace function--normal find Replace, method rename, class rename, regular expression pattern substitution.
- After all operations are completed, the tests are based on simpletest Aperiplus and the coverage of the tests is guaranteed.
- Integrate Phemto to ensure class relevance testing.
??????? Of course, it has some limitations and only runs on the Linux operating system, and only supports PHP5.2
??????? Are you interested? With it, your refactoring will be much faster and there will be no new bugs to be guaranteed.
??????? Official website: http://rephactor.sourceforge.net/
??????? Why not install one and try it?
?
?
?
?