How to use phpDocumentor to record code updates and dates for different authors
P粉080643975
P粉080643975 2024-01-10 18:12:54
0
2
525

Assume that the original document of a class is as follows:

/**
 * 我的自定义类
 *
 * 这个类帮助你做一些事情。它真的很棒。
 *
 * 作者:David Smith
 * 版本:1.0
 */
  1. If I rewrite 50% of the code, how do I record my important contribution?

  2. What is the best way to add a date? For example, the date the code was last modified, the date I made an update, or the date the version was updated.

P粉080643975
P粉080643975

reply all(2)
P粉545218185

One approach I've seen in companies I've worked for over the years is to do this:

/**
 * 我的自定义类
 *
 * 这个类可以帮助你做一些事情。非常好用。
 *
 * 作者:David Smith
 * 版本:1.0
 *
 * 修改者:Rahul Parkar
 * 修改日期:09/11/2012
 */

In addition, I also saw that they used two methods to record changes, one is to use a Git-like method where each commit has a commit message, and the other is to use another document tag to record the changes.

P粉512526720

I know I didn't really answer your question, but I'd like to know why you're still using @author.

If you want to track changes to your code (who created the file? Who modified it?), use your version control system. After all, that's what it's for :)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!