Home > Backend Development > PHP Tutorial > rephactor is an excellent PHP refactoring tool_PHP tutorial

rephactor is an excellent PHP refactoring tool_PHP tutorial

WBOY
Release: 2016-07-21 15:28:21
Original
1073 people have browsed it

The PHP framework can be a single entry, completely object-oriented, completely class-based MVC pattern. However, we are faced with a large amount of old code, or even new code, which is not necessarily fully compliant with object-oriented principles and design patterns. Small applications are fine. But if you face large-scale applications, it must be a big pain! !

What to do? Many people will always face this, and the PHP code needs to be refactored. (Of course, if you understand what I’m saying, you must have read 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 reconstruction! This is inevitable. But how can this pain be made lighter?

Refactoring tools are a must. Fortunately, there is now a refactoring tool for PHP - rephactor. It is indeed an excellent tool. (Of course, you must remember that there has never been a completely automated refactoring tool. Machines can never replace the human brain. The goal of all refactorings and every step still requires you to follow "Refactoring - Improving Existing Code". The book "Design" explains how to do it)

So: What does rephactor provide us?

  1. Ensure reversibility of refactoring - once a problem is discovered, the code is reversible and can be traced back to the previous version.
  2. Find and replace function - ordinary search and replace, method renaming, class renaming, regular expression pattern replacement.
  3. After all operations are completed, they are tested based on SimpleTest Aperiplus and the test coverage is guaranteed.
  4. Integrate Phemto to ensure class dependency testing.

Of course, it has some limitations and can only run on LINUX operating system, and only supports PHP5.2

Are you interested? With it, your refactoring will be greatly accelerated, and it is guaranteed that no new BUG will appear.

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

Why not install one and give it a try?

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323590.htmlTechArticleThe PHP framework can be a single entry, completely object-oriented, completely class-based MVC model. However, we are faced with a large amount of old code, or even new code, which is not entirely consistent...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template