Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 117 lines (82 sloc) 4.714 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
DEVELOPER'S GUIDE FOR ``pearweb´´ CODE
========================================================================

Read this before starting to hack on the PEAR website.

1) Coding Standards
------------------------------------------------------------------------

    Code for the PEAR website strictly follows the PEAR Coding Standards
    [1].

    If changes that do not follow these standards are committed to the
    repository, they will be reverted.

    Usage of '@' to silence warnings and notices is discouraged. Use it
    only if no clean solution exists.

2) Only commit working code
------------------------------------------------------------------------

    People constantly committing code that makes (parts of) the website
    inaccessible will lose their SVN karma.

    Test your changes before committing them. If you are unable to set
    up a test environment, you must not commit anything!


3) Usage of header comment blocks
------------------------------------------------------------------------

    Every newly added text file has to carry a header comment block
    similar to the following:

    /*
       +----------------------------------------------------------------------+
       | PEAR Web site version 1.0 |
       +----------------------------------------------------------------------+
       | Copyright (c) 2005 The PEAR Group |
       +----------------------------------------------------------------------+
       | This source file is subject to version 2.02 of the PHP license, |
       | that is bundled with this package in the file LICENSE, and is |
       | available at through the world-wide-web at |
       | http://www.php.net/license/2_02.txt. |
       | If you did not receive a copy of the PHP license and are unable to |
       | obtain it through the world-wide-web, please send a note to |
       | license@php.net so we can mail you a copy immediately. |
       +----------------------------------------------------------------------+
       | Author: Martin Jansen <mj@php.net> |
       +----------------------------------------------------------------------+
    */

4) Performance
------------------------------------------------------------------------

    The PEAR website can be considered a high traffic website, which is
    why a content cache is employed. If new sections/pages are added,
    one has to make sure that they get cached if it makes sense. (Most
    of the time it makes sense.)

    Also one has to ensure that newly added code does not lead to
    performance issues or bottlenecks.

5) Dependencies
------------------------------------------------------------------------

    If new dependencies are introduced, they must be written down in
    pearweb/package.xml.

    If possible, non-PEAR dependencies and dependencies on packages with
    only beta- or alpha-releases must be avoided.

6) Talk first, code later
------------------------------------------------------------------------

    If you want to implement new features, ask the PEAR webmaster team
    [2] first. Otherwise you may run into serious trouble.


7) Packaging & deployment
------------------------------------------------------------------------
See the instructions in https://wiki.php.net/systems/euk1 for production deployment

Ensure that you have deployed and tested the changes on test.pear.php.net
  $ pear upgrade -f package.xml
or a specific area:
  $ pear upgrade -f package-pepr.xml

Once you have tested your changes, you can proceed.

Third, make the appropriate pearweb release and push it to pear.php.net. Be sure to update the relevant package_*.php file and generate the new package.xml

  $ vim package_pepr.php
  $ php package_pepr.php make
  $ git commit -m "Release preparation" package-pepr.xml package_pepr.php
  $ pear package package-pepr.xml
  $ git tag -a pearweb_pepr-1.2.3 -m 'PEARWeb_PEPR-1.2.3'

Join the #pear IRC channel on efnet, and discuss the changes you are about to make.

Next:
  $ ssh pear.php.net
  $ sudo pear upgrade pearweb
  
or
  $ sudo pear upgrade pearweb_pepr

Apply any mysql, crontab changes manually.

Verify that http://pear.php.net/ is still functioning and update this changelog.


References
------------------------------------------------------------------------

[1] http://pear.php.net/manual/en/standards.php
[2] mailto:pear-webmaster@lists.php.net
Something went wrong with that request. Please try again.