Kapitel 8. Contributing your own code

Inhaltsverzeichnis
Requirements for contributing code
How to contribute code in practice

Requirements for contributing code

There are certain requirements your code needs to comply with in order to contributed to PEAR:

  1. Conforming to the coding standards

    If you want to contribute your code to PEAR, it has to be compliant to a set of coding standards. There have been numerous discussions about whether the coding standards are good or not and there has been the decision, that they are absolutely needed - please do not start such a discussion over and over again.

  2. Extensible and „forward-compatible“ code.

    Always keep in mind that your code should be extensible and that it has to be easy to add new features in the future. If you cannot think of an easy way, how to realize this with your codebase, without break existing behaviour, you should possibly think of a better design, before contributing it to PEAR.

  3. Documentation in an appropriate format (plain text, docbook)

    Your code has to come with appropriate documentation in one of the following formats:

    If you write the documentation in Docbook XML and if the markup is valid, the documentation can be easily added to the official PEAR Manual, which you are reading right now.

    Anmerkung: There are plans to provide an automated system which converts the PHPDoc API documentation of PEAR packages into Docbook XML which can be added to the official manual automatically. But until this system is in place, you have to write your documentation manually.

  4. The contributor („you“) is willing to provide support for his package(s) and is willing to release future (bug-fixing) versions.

    If you are not willing to maintain your code, it probably makes no sense to contribute it. Maintaining means in PEAR's case that you provide support via the various mailing lists, and that you are willing to roll further releases of your code, that contain bugfixes and enhancements.

    Warnung

    Code can be removed from PEAR if the original contributor is not willing to maintain the code anymore and if there is no other person that is willing to take over the maintainership.