Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

How should I be keeping track of a php script's versions/changes when it pertains to a single script in one file?

Should I have a separate changelog, and if so (1) what should it be named, (2) how should the contents of the log be formatted, and (3) how should the log be associated with the php script/file?

Or, should I include the changes in a comment at the top of the php file? Currently, I have the following comments at the top of the file:

/**
 * @author    John Doe <contact@John Doe.com>
 * @version   1.0
 * @copyright Copyright (c) 2010, John Doe
 */

Thanks in advance for your response!

share|improve this question
add comment

2 Answers

Aren't you using a VCS such as SVN, Git or Mercurial? There's no better way to keep track of the changes than being able to see the difference of the file. Of course, you would want to include the changelog on both: the main comment block and the last commit you do.

share|improve this answer
    
Consider me a php noob. I am not using any of those tools you mentioned. Perhaps you could dumb down your answer a little more for me? Thanks again for your help! –  Wilkons2 Sep 24 '10 at 14:46
2  
@Wilkons2: look at ericsink.com/scm/source_control.html and/or hginit.com for some information on source control. I'll second Cristian's recommendation to use some sort of system. For the time being I've switched to Mercurial and love it. Search around here and StackOverflow.com and you'll see a number of suggestions and commentary related to the various options that are available. –  AnonJr Sep 24 '10 at 15:11
add comment

Bro, use a versioning control system, svn, git, mercurial, even old CVS is better than nothing. And these are independent of whether you are using PHP or some other programming/scripting languages(s).

share|improve this answer
    
Theres no need for this duplicate answer, please delete. –  alternative Oct 16 '10 at 23:53
1  
It isn't a duplicate since mine 1) mentions CVS; 2) estates that even an old system like CVS is better than what you are/were describing; and states that version control has nothing to do with someone being new to PHP (or any programming language for that matter.) Let other readers decide if this is being redundant. Thanks –  luis.espinal Oct 18 '10 at 2:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.