Skip to content

Commit df3c606

Browse files
committed
Create README.md
This file contains the process to be used after moving over to git. The content is the same as from the README, only the commands have been transfered from svn to git with the addition of the extra process of maintaining the `.en-revisions.ref` file Closes GH-5
1 parent d50c49f commit df3c606

File tree

1 file changed

+136
-0
lines changed

1 file changed

+136
-0
lines changed

README.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
2+
# READ THIS FIRST
3+
4+
This directory contains source files and a setup for converting
5+
PHP's XML documentation into presentation formats like HTML and
6+
RTF. You should not have to bother with this unless you are
7+
writing documentation yourself, or if you simply are curious
8+
about how the XML stuff works.
9+
10+
If you just want to read the documentation, look at:
11+
http://www.php.net/docs.php
12+
13+
# HOW TO WRITE PHPDOC FILES
14+
15+
If you are interested in information about how to
16+
set up the tools needed, how to work with git and
17+
DocBook on Linux or Windows, or what conventions you
18+
should follow when writing phpdoc files, please refer
19+
to the PHP Documentation HOWTO.
20+
21+
You can read the HOWTO online at: http://doc.php.net/tutorial/
22+
23+
If you are already working with the phpdoc module,
24+
then you can find its XML source in the howto directory
25+
of the module, and build it yourself with:
26+
27+
```bash
28+
phd -d .manual.xml
29+
```
30+
31+
However, PhD is a separate project which can be read about here:
32+
http://wiki.php.net/doc/phd
33+
34+
## QUICK REFERENCE
35+
36+
### source checkout
37+
38+
For a more general git-workflow see [the Wiki](https://wiki.php.net/vcs/gitworkflow#reviewing_and_closing_pull_requests).
39+
Make sure to upload your SSH-key to your account at people.php.net
40+
41+
Check out the source
42+
43+
```bash
44+
mkdir phpdoc
45+
cd phpdoc
46+
git clone [email protected]:/doc/en.git
47+
git clone [email protected]:/doc/your-language-of-choice.git
48+
git clone [email protected]:/doc/base.git doc-base
49+
```
50+
51+
Change `your-language-of-choice` if you would like to check out a different language.
52+
53+
Where `en/` contains the DocBook source files, and `doc-base` contains tools
54+
and resources used in all languages.
55+
56+
### edits
57+
58+
* Make the change. Use spaces not tabs. Be sure to carefully watch your whitespace!
59+
* Look at your unified diff, make sure it looks right and that whitespace changes aren't mixed in:
60+
```bash
61+
git diff path/to/file.xml
62+
```
63+
64+
* Make sure no errors are present, so at the command line in your phpdoc source directory run:
65+
```bash
66+
php doc-base/configure.php
67+
```
68+
* If you are translating, remember to add the full hash of the english base-file that you are translating
69+
from, to the files `EN-Revision`-comment
70+
71+
**Always run `php configure.php` before commit!**
72+
* Commit your changes
73+
```bash
74+
git commit path/to/file.xml
75+
```
76+
77+
Read the HOWTO for more information. After reading the HOWTO,
78+
email the phpdoc mailing list ([email protected]) with questions
79+
and concerns.
80+
81+
### new functions
82+
83+
* Copy an existing xml file or use a skeleton from the HOWTO.
84+
Rename and place it into the appropriate directory.
85+
* Edit. Be sure no leftover text exists. No tabs either.
86+
* If you are translating, remember to add the full commit-hash of the english
87+
base-file that you are translating from, to the files `EN-Revision`-comment.
88+
* Now test locally before commit by first running
89+
```bash
90+
php configure.php
91+
```
92+
* Add the file to your staging area
93+
```bash
94+
git add path/to/yourfile.xml
95+
```
96+
* Commit the file and push it to the git-server
97+
```bash
98+
git commit path/to/yourfile.xml
99+
git push remote your-branch
100+
```
101+
* Open a PullRequest to the main repository via github
102+
103+
Note that the version numbers are taken care of elsewhere (don't worry
104+
about them)
105+
106+
### some popular tags and entities
107+
108+
<filename> filenames
109+
<constant> constants
110+
<varname> variables
111+
<parameter> a function's parameter/argument
112+
<function> functions, this links to function pages or bolds if
113+
already on the function's page. it also adds ().
114+
115+
<literal> teletype/mono-space font <tt>
116+
<emphasis> italics
117+
<example> see HOWTO, includes many other tags.
118+
<link> internal manual links
119+
<link linkend="language.variables">variables</link>
120+
121+
<link> external links via global.ent
122+
<link xlink:href="&spec.cookies;">mmm cookies</link>
123+
124+
<type> types, this links to the given types manual
125+
page: <type>object</type> -> php.net/types.object
126+
127+
128+
&return.success; see: language-snippets.ent
129+
&true; <constant>TRUE</constant>
130+
&false; <constant>FALSE</constant>
131+
&php.ini; <filename>php.ini</filename>
132+
133+
Be sure to check out globals.ent and language-snippets.ent for
134+
more information for entities and urls.
135+
136+
---------------------------------------------------------------------------

0 commit comments

Comments
 (0)