\documentclass{article}
\usepackage{ulem}
\pagestyle{headings}
\begin{document}
\tableofcontents

\part{ Introduction}
The \textbf{Components} package is a developer tool focused on handling package metadata like changelogs or pear and composer manifesto. While it may offer a few functionalities that can be of general use to people maintaining PEAR based packages the primary focus of the tool is to deal with the various Horde components.

The tool provides different modules each of which allow to perform a specific action. The most important ones are documented below.

\part{ Installation}
The tool is a pure Horde 4/5 tool and has not seen a real release yet. You are currently encouraged to run it directly from a git checkout\footnote{https://github.com/horde/components}.

\part{ Usage}
You must have the Horde framework installed within your PHP include path or supply an include path on the commandline. The standard procedure for this is detailed on this page\footnote{http://example.com/index.php?page=Doc/Dev/Framework}. If it does not work, consider installing the `components` module with PEAR:\newline
\begin{verbatim}

pear install horde/components/package.xml
\end{verbatim}

Now you should be able to run the tool with:

\begin{verbatim}

php horde/components/bin/horde-components.php --help
\end{verbatim}

If the installed Horde framework packages do not reside in your default \textsl{include\_path} you can explicitly add the corresponding path on the command line by adding \texttt{-D include\_path=PATH}.

\part{ Modules}
\section{ Quality Checks}
The qc module performs various quality checks, including phpunit, phpmd (Mess Detector) and phpcpd (copy paste detector).\newline
The qc module also has integration for PHP\_CodeSniffer 2.x.\newline
CodeSniffer\footnote{http://example.com/index.php?page=CodeSniffer} is not shipped along with the component tool. If no CodeSniffer\footnote{http://example.com/index.php?page=CodeSniffer} is older or CodeSniffer\footnote{http://example.com/index.php?page=CodeSniffer} is 3.0 or newer, this part will be skipped.

\section{ PEAR package.xml updater}
This module offers the \textbf{-u} command line option. It will automatically update the \textsl{package.xml} manifest of a PEAR package. This primarily handles the content list of the package. So whenever you add new source code files or move existing ones you can easily generate an updated package list.

\begin{verbatim}

php horde/components/script/horde-components.php -u horde/framework/PACKAGE
\end{verbatim}

Make sure you only add the path to the directory of the package. The \textsl{package.xml} element should not be added.

\textbf{The command given above overwrites the old version of the file!} If you only want a preview of what the command would generate you can use the \textbf{-p} option. But since the Horde components are maintained in \textsl{git} it is usually quite okay to just overwrite the old content. The git diff can be then used to validate that the changes introduced by the \textbf{Components} tool do not create any problems.

\section{ Package dependency list}
The \textsl{dependency} module offers the \textbf{-D} option and produces a dependency graph for a Horde component.

\begin{verbatim}

php horde/components/script/horde-components.php -L horde/framework/Mime

List only contains required dependencies!
Dependencies on PEAR itself are not displayed.

|_Mime                                   [pear.horde.org]   
  |_idn                                  [pecl.php.net]      (EXTERNAL) ***STOP***
  |_Net_SMTP                             [pear.php.net]      (EXTERNAL) ***STOP***
  |_Exception                            [pear.horde.org]   
  |_Mail                                 [pear.horde.org]   
    |_Net_SMTP                           [pear.php.net]      (EXTERNAL) ***STOP***
    |_Exception                          [pear.horde.org]    (ALREADY LISTED WITH Mime) ***STOP***
  |_Stream_Filter                        [pear.horde.org]   
  |_Support                              [pear.horde.org]   
    |_Stream_Wrapper                     [pear.horde.org]   
  |_Util                                 [pear.horde.org]   
    |_Url                                [pear.horde.org]   
      |_Exception                        [pear.horde.org]    (ALREADY LISTED WITH Mime) ***STOP***
\end{verbatim}

As indicated in the output of the command this listing only lists the dependencies that are declared to be \textbf{required} within the \textsl{package.xml} manifests. If you want to have a list of \textbf{all} dependencies including the optional once you need to add the \textbf{--verbose} option.

If you need a really terse list of just the required elements you can add the \textbf{--quiet} option:

\begin{verbatim}

php horde/components/script/horde-components.php -L horde/framework/Mime --quiet

List only contains required dependencies!
Dependencies on PEAR itself are not displayed.

Exception           [pear.horde.org]    
Mail                [pear.horde.org]    
Mime                [pear.horde.org]    
Stream_Filter       [pear.horde.org]    
Stream_Wrapper      [pear.horde.org]    
Support             [pear.horde.org]    
Url                 [pear.horde.org]    
Util                [pear.horde.org]    
Net_SMTP            [pear.php.net]      
idn                 [pecl.php.net]      
\end{verbatim}

\part{ horde/git-tools}
The components application can be used from inside horde git tools via the "components" action followed by what you would enter as the components action and parameters. Not all aspects are currently supported.

\part{ Downstream Development}
Some of the commands inside components rely on horde developer infrastructure which may not be available to the general public or not available in isolated development hosts.

SeeDownstream Developer Docs\footnote{http://example.com/index.php?page=Doc/Dev/Downstream}

\part{ Miscellaneous}
For pear related functions like "snapshot" to work as expected, you MUST have the pear horde channel registered, the Horde\_Role package installed and the horde\_dir properly configured

\section{ Bugs}
Nothing reported yet.

\section{ People}
Gunnar Wrobel\footnote{http://example.com/index.php?page=GunnarWrobel}

\section{ Resources}
Nothing added yet.


\noindent\rule{\textwidth}{1pt}
Back to the Developer Documentation\footnote{http://example.com/index.php?page=Doc/Dev}

\end{document}
