The Components package is a developer tool focused on handling PEAR packages. 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.
The tool is a pure Horde4 tool and has not seen a real release yet. You are currently encouraged to run it directly from a git checkout of the horde repository.
You must have the Horde framework installed within your PHP include path. The standard procedure for this is detailed on this page. If it does not work, consider installing the `components` module with PEAR:
pear install horde/components/package.xml
Now you should be able to run the tool with:
php horde/components/bin/horde-components.php --help
If the installed Horde framework packages do not reside in your default include_path you can explicitly add the corresponding path on the command line by adding -D include_path=PATH.
This module offers the -u command line option. It will automatically update the 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.
php horde/components/script/horde-components.php -u horde/framework/PACKAGE
Make sure you only add the path to the directory of the package. The package.xml element should not be added.
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 -p option. But since the Horde components are maintained in 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 Components tool do not create any problems.
The dependency module offers the -D option and produces a dependency graph for a Horde component.
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***
As indicated in the output of the command this listing only lists the dependencies that are declared to be required within the package.xml manifests. If you want to have a list of all dependencies including the optional once you need to add the --verbose option.
If you need a really terse list of just the required elements you can add the --quiet option:
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]
Nothing reported yet.
Nothing added yet.
Back to the Developer Documentation