Rephactor excellent PHP reconstruction tool _ PHP Tutorial

Source: Internet
Author: User
Tags php framework
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?

  1. Ensure that refactoring is reversible-once a problem is found, the code is reversible and can be traced back to the previous version.
  2. Find and replace functions-common search replacement, method rename, class rename, and regular expression mode replacement.
  3. After all the operations are completed, the test is based on SimpleTest Aperiplus and the test coverage is ensured.
  4. 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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.