doc:howto:gettingstarted

This is an old revision of the document!


What is needed

Joining the PHP Documentation team

Joining the PHP Documentation team is a simple process, but a process nonetheless. It can be summarized as:

Write the mailing list

Because official communication is done there, you should write the list. Say “Hi” and what you're interested in doing. You may feel more comfortable lurking for awhile, or reading the archives, or hanging out in IRC (#php.doc on Efnet) for awhile, but ultimately let the list know who you are.

Create a doc patch or three

This shows a few things:

  • That you really do intend to do some work
  • That you're a real human
  • That you know, for the most part, what you're doing

This HOWTO covers how to do this (checkout from SVN, edit, svn diff foo > doc.patch) but ultimately you must do it. We're all in the same boat here, so please jump on board!

Talk about the patch

So now that you've showed initiative enough to actually setup the documentation toolchain, make edits, and create a nice looking patch (or three), it's time to let people know about it. Post it to the mailing list. People will offer feedback and advice, and do remember that we all make mistakes so don't be afraid. The most common mistakes involve whitespace issues so watch what whitespace! :)

Gain commit access

After talking about the patch, you'll be asked to request a SVN account and soon thereafter it'll be approved with PHP documentation karma granted. In other words, commit your own patches! PHP peer review happens after commits are made, and most committers receive emails regarding each commit and have a look. Essentially, we all trust each other and enjoy seeing each other work.

Subversion (SVN)

Since the documentation is stored in SVN, you'll need a SVN client. SVN is a common form of version control and every operating system has clients for this. A client does not mean a GUI although some people prefer GUI interfaces. The following list is not exhaustive put should provide an idea for what we're talking about.

Windows

The most common is TortoiseSVN. Here are the steps to checkout the sources of the PHP manual using it:

  • Download and install TortoiseSVN: http://tortoisesvn.net/
  • Open a new explorer window and go to the folder you wish to do the checkout into
  • Right click anywhere in the blank area to spawn the context menu, select “SVN Checkout...”
  • A new window will popup asking for details about the checkout, these values will be remembered, so you will not need to enter them again
  • Enter the following URL: “https://svn.php.net/repository/phpdoc/modules/doc-en/”, then OK to begin the checkout
Mac

The command-line works fine, download/install the sources (or binaries) from http://subversion.tigris.org/

Linux

The command-line works fine, download/install the sources (or binaries) from http://subversion.tigris.org/

The source files

Using SVN, checkout the source files of the PHP manual. These are the files you will edit and commit, and anyone (no account is required) may checkout these files. For example, using the command-line:

That will use svn:externals to checkout both the doc-base and en/ modules, into a local directory named phpdoc. Then, after the above you might:

  • cd phpdoc
  • vim en/preface.xml
  • php doc-base/configure.php

In other words, this will create a directory named 'phpdoc' with a subdirectory 'en' that contains all of the English files. And a 'doc-base' directory with files used to validate/build/help the process. Now, a translator will instead do something like the following (to checkout German):

Note: The above can all be done anonymously, therefore does not require a SVN account. Going through the above process is required before gaining SVN access, as is submitting a few patches to the phpdoc mailing list. After doing so, people realize your're both sane and serious, apply for SVN access and it will granted so you may commit changes to the PHP documentation yourself.

PHP

You'll need a recent version of PHP. Since the build system requires PHP 5.3, you should probably install it. However, building the manual is optional as validation (ensuring XML changes are valid) is a separate process and will work with any version of PHP 5.

PhD

The build system that builds both the downloadable and online versions of the PHP manual. It also builds the PEAR manual, and several other DocBook 5 based documents. Installing PhD is optional, however it's recommended so you may see what your changes will look like.

Note: doc-base/configure.php is not part of phd. configure.php is what turns all the XML files into one monolithic XML files that phd then processes, therefore, running configure.php before each use of phd is required.

A text editor

Any will do, as XML is simply text. Most text editors provide syntax highlighting for XML files.

Note: Please disable the 'remove ending whitespace' future of your text editor.

doc/howto/gettingstarted.1310338378.txt.gz · Last modified: 2017/09/22 13:28 (external edit)