PEAR_Exception

The standalone base PEAR_Exception class from PEAR core, packaged for Composer.

Library
Composer
vv1.0.2
97stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
35/100Needs Attention
Development Activity4
Maintenance20
Community44
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
63/100Good
Architecture58
Code Quality60
Innovation45
Learning Curve88

PEAR_Exception is the base exception class from PEAR core, extracted into its own repository and packaged for Composer. Many long-standing PEAR packages extend this class as the root of their exception hierarchies, and this distribution lets modern projects depend on just that one class without installing the entire PEAR system.

It follows the pear-core repository and is updated whenever a new PEAR version is released, so it stays compatible with the packages that build on it while remaining a tiny, dependency-light building block.

What You Get

  • The standalone PEAR_Exception base class from PEAR core
  • Composer/Packagist packaging so it installs as a normal dependency
  • Support for exception cause chaining in the PEAR convention
  • Exception observer/callback hooks inherited from PEAR
  • A minimal footprint with no wider PEAR runtime required

Common Use Cases

  • Satisfying a PEAR package’s dependency on the base exception class
  • Extending PEAR_Exception as the root of a library’s exception hierarchy
  • Maintaining or migrating legacy PEAR-based code under Composer
  • Reusing PEAR’s exception-chaining semantics without the full PEAR install

Under The Hood

Architecture - The repository contains a single meaningful class under PEAR/Exception.php, autoloaded via a Composer classmap. PEAR_Exception extends PHP’s Exception and adds PEAR-specific features such as cause chaining and observer callbacks that other PEAR packages rely on. It is intentionally a leaf dependency with nothing else attached.

Tech Stack - Pure PHP (>=5.2) with a classmap autoloader over the PEAR/ directory. It carries no runtime dependencies and preserves the original PEAR package.xml metadata alongside the Composer configuration.

Code Quality - The class is long-established, stable, and unchanged except to track pear-core releases. It reflects an older PHP era stylistically but is well understood and heavily depended upon across the PEAR ecosystem, with a tests/ directory included.

API Design - Usage is simply extending PEAR_Exception or catching it, exactly as with any exception class. Its familiarity to PEAR developers and its tiny surface make it a drop-in base with essentially no learning curve.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search