Moved-Controversial Changes

From PEAR Wiki

(Redirected from Controversial Changes)
Jump to: navigation, search

Template:TOClimit

Contents

[edit] Summary

[edit] Information

[edit] Document Information

[edit] Author(s) Information

  • Name: Gregory Beaver
  • Email: cellog@php.net

[edit] Legal Information

  • This proposal is under CC-By-Sharealike ([1]) licensing.

[edit] Discussion List

[edit] Introduction

This document itemizes changes to the coding standards that refer to loading of external files containing classes.

These have been extracted from the general PEAR2 Standards.

Documenting the location of external classes (classes not contained within a file) is an important problem to solve within PEAR2. There are two kinds of external classes:

  1. those contained within the current package
  2. external package dependencies

This recommendation defines how to handle both

[edit] Summary

This document describes the coding standards and coding conventions for the new PEAR2 repository.

[edit] Approach & Requirements

Packages that wish to be accepted into the PEAR2 repository must conform to these standards

[edit] Definition

[edit] Handling dependencies

File dependencies (required and optional) should be registered at the top of the file using /** */ documentation comments as well as with full import statements:

  <?php
  /**
   * My Package
   * @uses PEAR2::SomeotherPackage in PEAR2/SomeotherPackage.php (package PEAR2::Someotherpackage must be installed)
   * @uses PEAR2::PackageName::Exception in PEAR2/PackageName/Exception.php
   * @package PEAR2_PackageName
   */
  namespace PEAR2;
  use ::PEAR2::PackageName::Exception as Exception;
  use ::PEAR2::SomeotherPackage as PEAR2::SomeotherPackage;
  ?>

[edit] Requirement

No Exceptions to this rule

Personal tools