• Stars
    star
    321
  • Rank 130,752 (Top 3 %)
  • Language
    PHP
  • License
    Other
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tools for the PHP documentation

Read this first

This directory contains source files and a setup for converting PHP's XML documentation into presentation formats like HTML and RTF. You should not have to bother with this unless you are writing documentation yourself, or if you simply are curious about how the XML stuff works.

If you just want to read the documentation, look at: https://www.php.net/docs.php

How to write phpdoc files

If you are interested in information about how to set up the tools needed, how to work with Git and DocBook on Linux or Windows, or what conventions you should follow when writing phpdoc files, please refer to the PHP Documentation HOWTO.

You can read the HOWTO online at: http://doc.php.net/tutorial/

If you are already working with the phpdoc module, then you can find its XML source in the howto directory of the module, and build it yourself with:

phd -d .manual.xml

However, PhD is a separate project which can be read about here: https://wiki.php.net/doc/phd

Quick reference

Source checkout

For a more general git-workflow see the Wiki. Make sure to upload your SSH public key to your account at main.php.net

Check out the sources:

mkdir phpdoc
cd phpdoc
git clone [email protected]:php/doc-en.git en
git clone [email protected]:php/doc-your-language-of-choice.git your-language-of-choice
git clone [email protected]:php/doc-base.git

Change your-language-of-choice if you would like to check out a different language.

The en folder contains the English DocBook source files, and doc-base contains tools and resources used in all languages.

Edits

  • Make the change. Use spaces not tabs. Be sure to carefully watch your whitespace!
  • cd into the desired clone directory, e.g.
    cd en
  • Look at your unified diff, make sure it looks right and that whitespace changes aren't mixed in:
    git diff path/to/file.xml
  • Make sure no errors are present, so at the command line in your phpdoc source directory run:
    php ../doc-base/configure.php
  • If you are translating, remember to add the full Git commit hash of the English file that you are translating from, to the file's EN-Revision comment.
  • Commit your changes
    git commit path/to/file.xml

Read the HOWTO for more information. After reading the HOWTO, email the phpdoc mailing list ([email protected]) with questions and concerns.

New functions

  • Copy an existing XML file or use a skeleton from the HOWTO. Rename and place it into the appropriate directory.
  • Edit. Be sure no leftover text exists. No tabs either.
  • If you are translating, remember to add the full Git commit hash of the English file that you are translating from, to the file's EN-Revision comment.
  • cd into the desired clone directory, e.g.
    cd en
  • Now test locally before commit by first running
    php ../doc-base/configure.php
  • Add the file to your staging area
    git add path/to/yourfile.xml
  • Commit the file and push it to the git-server
    git commit path/to/yourfile.xml
    git push remote your-branch
  • Open a pull request to the main repository via GitHub

Some popular tags and entities

<filename>          filenames
<constant>          constants
<varname>           variables
<parameter>         a function's parameter/argument
<function>          functions, this links to function pages or bolds if
                    already on the function's page.  it also adds ().

<literal>           teletype/mono-space font <tt>
<emphasis>          italics
<example>           see HOWTO, includes many other tags.
<link>              internal manual links
                    <link linkend="language.variables">variables</link>

<link>              external links via global.ent
                    <link xlink:href="&spec.cookies;">mmm cookies</link>

<type>              types, this links to the given types manual
                    page: <type>object</type> -> php.net/types.object

&return.success;    see: language-snippets.ent
&true;              <constant>TRUE</constant>
&false;             <constant>FALSE</constant>
&php.ini;           <filename>php.ini</filename>

Be sure to check out global.ent and language-snippets.ent (located within each language's repo) for more information for entities and URLs.

Quality Assurance Tools (QA Tools)

There are various scripts available to ensure the quality of the documentation and find issues with it, they are located in the scripts/qa/ directory.

There might be some more just in scripts/ but they need to be checked if they are still relevant and/or given some love.

More Repositories

1

php-src

The PHP Interpreter
C
36,014
star
2

php-langspec

PHP Language Specification
PHP
2,289
star
3

web-php

The www.php.net site
PHP
778
star
4

doc-en

English PHP documentation
XML
498
star
5

php-rfcs

Experimental repo for GitHub based RFC workflow. For now, please don't submit PRs.
294
star
6

php-gtk-src

The PHP GTK Bindings
C++
201
star
7

pie

The PHP Installer for Extensions
PHP
158
star
8

doc-zh

Chinese translation of the PHP documentation
130
star
9

pecl-php-operator

Operator overloading for Objects
C
124
star
10

doc-pt_br

Brazilian Portuguese translation of the PHP documentation
XML
98
star
11

php-sdk-binary-tools

Tool kit for building PHP under Windows
M4
82
star
12

phd

PHD
PHP
68
star
13

web-qa

The PHP QA Website
PHP
68
star
14

pecl-file_formats-yaml

YAML-1.1 parser and emitter
C
67
star
15

doc-ja

Japanese translation of the PHP documentation
HTML
67
star
16

pecl-search_engine-solr

The Apache Solr PHP extension is an extremely fast, light-weight, feature-rich library that allows PHP applications to communicate easily and efficiently with Apache Solr server instances using an object-oriented API.
C
61
star
17

web-bugs

The PHP Bugtracking System
PHP
58
star
18

pecl-php-uploadprogress

An extension to track progress of a file upload
C
54
star
19

pecl-networking-ssh2

Bindings for the libssh2 library
C
51
star
20

doc-ru

Russian translation of the PHP documentation
XML
48
star
21

presentations

PHP presentations
HTML
45
star
22

web-doc-editor

The PHP Documentation Editor
JavaScript
43
star
23

systems

Hooks and Cronjobs for PHP Infrastructure
C
41
star
24

pecl-networking-uuid

UUID extension
C
35
star
25

web-wiki

The PHP Wiki Systems
PHP
35
star
26

doc-fr

French translation of the PHP documentation
HTML
34
star
27

pecl-networking-gearman

PHP wrapper to libgearman
C
32
star
28

web-doc

PHP
32
star
29

web-php-distributions

All released PHP distributions
PHP
28
star
30

php-tasks

Tasks that need doing. This is for php-src maintainers. The end-user bug tracker is at https://bugs.php.net/.
28
star
31

pecl-mail-mailparse

Email message manipulation
C
27
star
32

php-windows-builder

Tooling to build PHP and extensions on Windows
PowerShell
27
star
33

pecl-system-yaf

PHP Framework in PHP extension
C
26
star
34

pecl-database-mysql

Legacy MySQL extension
PHP
25
star
35

web-pecl

The PECL website
PHP
24
star
36

web-master

The user management system
PHP
23
star
37

web-windows

PHP
22
star
38

doc-de

German translation of the PHP documentation
XML
21
star
39

pecl-languages-v8js

V8 Javascript Engine for PHP
C++
21
star
40

pecl-system-dio

Direct I/O functions
C
21
star
41

pecl-tools-stomp

Stomp Client Extension
C
20
star
42

web-pres2

PHP presentation system
PHP
19
star
43

web-gtk

The PHP GTK site
HTML
18
star
44

doc-es

Spanish translation of the PHP documentation
18
star
45

pecl-database-ibm_db2

Extension for IBM DB2 Universal Database, IBM Cloudscape, and Apache Derby
PHP
18
star
46

pecl-database-mysql_xdevapi

PECL MySQL X DevAPI
C++
17
star
47

pecl-caching-apc

Alternative PHP Cache
PHP
17
star
48

pecl-http-pecl_http

Extended HTTP Support
17
star
49

pecl-system-sync

Synchronization objects
C
16
star
50

pecl-numbers-bitset

C
16
star
51

pecl-event-libevent

Libevent - event notification
C
15
star
52

pecl-php-runkit

PECL Runkit Extension
15
star
53

pecl-database-pdo_ibm

PDO driver for IBM databases
PHP
15
star
54

web-gcov

The PHP GCOV system
PHP
15
star
55

pecl-encryption-mcrypt

Interface to the mcrypt library
PHP
14
star
56

doc-tr

Turkish translation of the PHP documentation
14
star
57

web-shared

Shared code across various .php.net sites
CSS
14
star
58

pecl-php-parsekit

PHP Opcode Analyser
C
14
star
59

web-people

The PHP people system
PHP
14
star
60

web-rmtools

The PHP release management tools
PHP
13
star
61

karma

The Karma Stuff
PHP
12
star
62

pecl-text-xdiff

File differences/patches.
C
12
star
63

pecl-search_engine-sphinx

Client extension for Sphinx - opensource SQL full-text search engine
C
12
star
64

pecl-php-ffi

Foreign Function Interface
C
11
star
65

pecl-caching-memcache

memcached extension
C
10
star
66

web-news

The mailinglist frontend
PHP
10
star
67

pecl-authentication-krb5

PECL krb5 extension
C
10
star
68

doc-it

Italian translation of the PHP documentation
HTML
10
star
69

pftt2

A test tool for the PHP ecosystem designed for convenience, thoroughness and speed.
Java
10
star
70

.github

Github organization configuration
10
star
71

pecl-datetime-timezonedb

Timezone Database to be used with PHP's date and time functions
C
10
star
72

pecl-web_services-oauth

oauth consumer extension
C
9
star
73

doc-uk

Ukrainian translation of the PHP documentation
9
star
74

php-svn-helpers

Helper scripts to checkout the php-src repository from github.
Shell
9
star
75

pecl-networking-mqseries

MQseries client library
C
9
star
76

pecl-php-blenc

BLowfish ENCryption for PHP Scripts
C
9
star
77

pecl-security-selinux

SELinux binding for PHP script language
C
7
star
78

pecl-text-ssdeep

PECL ssdeep Fuzzy Hashing extension
C
7
star
79

pecl-networking-geoip

Map IP address to geographic places
C
7
star
80

pecl-networking-xmlrpc

XML-RPC server and client bindings
C
7
star
81

pecl-tools-fann

PECL fann - Artificial neural networks
C
6
star
82

pecl-math-trader

Technical Analysis for traders.
C
6
star
83

pecl-database-pdo_user

Userspace driver for PDO
C
6
star
84

playground

Git testing playground
PHP
6
star
85

pecl-database-dbase

dBase database file access functions
PHP
6
star
86

php-fuzzing-sapi

PHP Fuzzing SAPI
C
5
star
87

pecl-caching-wincache

Windows Cache Extension for PHP
C
5
star
88

pecl-file_formats-rar

rar extension
C++
5
star
89

doc-pl

Polish translation of the PHP documentation
HTML
4
star
90

benchmarking-data

4
star
91

pecl-database-pq

PECL pq extension
4
star
92

pecl-xml-xmldiff

XML diff and merge
C++
4
star
93

pecl-text-wddx

WDDX data exchange format
PHP
4
star
94

pecl-php-raphf

PECL raphf extension
4
star
95

pecl-database-pdo_informix

PDO driver for IBM Informix INFORMIX databases
C
4
star
96

pecl-php-memtrack

PHP extension to watch (unusually high) memory consumption in PHP scripts
C
4
star
97

pecl-internationalization-fribidi

Implementation of the Unicode BiDi algorithm
C
4
star
98

pecl-file_formats-lzf

LZF compression
C
3
star
99

pecl-database-interbase

InterBase/FireBird extension
C
3
star
100

pecl-multimedia-xmp

xmp module file
C
3
star