Oihana PHP Exceptions

Oihana PHP Exceptions

Latest Version Total Downloads License

A lightweight, framework-agnostic collection of well-defined exception classes that extend PHP's native Exception. Each type represents a clear, specific error scenario โ€” making error handling more expressive, consistent and easier to maintain.

๐Ÿ“š Documentation

You are currently browsing the auto-generated API reference (phpDocumentor).

๐Ÿ“ฆ Installation

This library requires PHP 8.4+ and is installed via Composer:

composer require oihana/php-exceptions

โœจ Features

  • ๐Ÿ›  Ready-to-use exception classes for common application errors.
  • ๐Ÿงฉ Extends the standard Exception class where relevant.
  • ๐ŸŒ HTTP error exceptions (Error400 โ€ฆ Error500) with sensible default messages and status codes.
  • ๐Ÿ” Improves code readability and error semantics.
  • โšก Lightweight with zero external dependencies.
  • ๐Ÿ“ฆ Easily integrable in any PHP project or framework.

โœ… Tests & coverage

Run the unit-test suite (PHPUnit, strict mode):

composer test

Measure coverage (requires Xdebug or PCOV):

composer coverage
composer coverage:md

๐Ÿงพ License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).

๐Ÿ‘ค About the Author

๐Ÿ”— Related packages

  • oihana/php-core โ€” core helpers and utilities used across the Oihana libraries.

๐Ÿ”— Project on GitHub

View the full source code and contribute on GitHub: github.com/BcommeBois/oihana-php-exceptions.

Search results