Rephactor Excellent PHP refactoring tool

Source: Internet
Author: User
Tags php code php framework regular expression
The PHP framework can be a single entry, fully object-oriented, completely based on the MVC pattern of classes. However, we face a large number of old code, or even the new code, is not entirely consistent with object-oriented principles, consistent with design patterns. Small application is no harm. But if the face of large-scale applications, it must be a big pain!!

What to do? A lot of people always face this, PHP code needs refactoring. (Of course, if you can understand what I'm talking about, you must have seen 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 reconstruction! This is inevitable. But how can this pain be made lighter?

Refactoring tools are necessary. Fortunately, now there is really a PHP refactoring tool--rephactor. It's really a very good tool. (Of course, you have to remember that there has never been a fully automated refactoring tool that can never replace a human brain, that all the refactoring goals, and every step of the way, is still going to be done in terms of refactoring-improving the design of existing code. )

So: What did Rephactor offer us?

  1. Ensure the reversibility of refactoring-once the problem is discovered, the code is reversible and can be traced back to the previous version.
  2. Find replacements--normal lookup substitution, method renaming, class renaming, and replacement of regular expression patterns.
  3. After all operations are completed, the tests are based on simpletest Aperiplus and the coverage of the tests is ensured.
  4. Integrate Phemto to ensure class correlation testing.

Of course, it has some limitations that can only run on the Linux operating system, and only support PHP5.2

Are you interested? With it, your refactoring will be much faster, and there will be no new bugs.

Official website:http://rephactor.sourceforge.net/

Why not install one and try?



Related Article

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.