doc:howto:faq

This is an old revision of the document!


If a <refentry> should not emit versioning information, what should I do?

  • Add the role=“noversion” to its <refentry>
  • Example: <refentry xml:id="reserved.variables.argc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role=“noversion">

How do I add a link to a method?

  • Use <methodname>Class::Method</methodname>
  • Note that the case does not matter when adding a link.

I'm about to document a new PHP extension... how should I start?

  • Use phpdoc/scripts/docgen/*
  • Example: $ php docgen.php -h
  • It creates the skeletons then each file should be edited

I want to contribute to the PHP Manual, how?

  • First, read the HOWTO
  • Check out the sources: $ cvs -d :pserver:cvsread@cvs.php.net:/repository checkout phpdoc
  • For a translation, change phpdoc to phpdoc-{lang} where {lang} is the language code
  • ...

How do I build and/or test the manual locally?

  • Use phpdoc/configure.php to validate and then phd to build
  • To validate en: $ php configure.php
  • To validate fr: $ php configure.php --with-lang=fr (Change fr to your given language code)
  • To build: $ phd -d .manual.xml
  • Note: Building is not required, all you must do is check the diff and be sure it validates

Running configure.php ends up Segfaulting, what is up?

  • There are bugs with certain versions of libxml that cause this, so hacks exist to get around it
  • To execute the hack, pass in: $ php configure.php --disable-segfault-error
  • Note: This disables some error checking and beautification but raw errors will be shown
  • Note: Usually the problem is a major XML syntax issue

In the changelog, which order do the PHP versions go?

  • Newest PHP versions go above the older ones

Why does everyone care so much about whitespace?

  • See the following article: whitespace
  • XML is one space, PHP example code is four, and max width is ~78 characters
  • Exceptions: <refpurpose> is on one line, ...

How do I create a patch?

  • In the command-line, go to the CVS directory:
  • cd /path/to/phpdoc/cvs
  • To diff the entire repository: cvs diff -u
  • To diff a single file: cvs diff -u foo.xml
  • Consider piping the diff to a file, so: cvs diff -u foo.xml > mypatch.txt

How do I apply a patch?

  • Assuming the file with the patch is named apatch.txt
  • Go to the directory with the files to be patched
  • And run this command: patch -p0 < apatch.txt
doc/howto/faq.1238526238.txt.gz · Last modified: 2017/09/22 13:28 (external edit)