Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pear Core Minimal Laravel Package

pear/pear-core-minimal

Minimal core components for PEAR, providing essential infrastructure for PEAR-based installs and tooling without the full PEAR distribution. Useful for lightweight setups, embedding, or environments that need only the basics of PEAR’s package system.

View on GitHub
Deep Wiki
Context7

Getting Started

This package provides a Composer-compatible, minimal subset of the legacy PEAR core infrastructure (e.g., PEAR.php, PEAR5.php, PEAR/Error.php). To start:

  • Install via Composer: composer require pear/pear-core-minimal
  • Locate core classes at vendor/pear/pear-core-minimal/ (e.g., PEAR.php, PEAR/Exception.php)
  • No configuration required— Composer’s autoloader handles inclusion automatically.
  • First use case: Migrating older PHP codebases that still rely on PEAR base classes (e.g., legacy PEAR packages like PEAR::raiseError(), or packages requiring PEAR_Config) without pulling the full monolithic PEAR installation.

Implementation Patterns

  • Backward Compatibility Layer: Load PEAR.php explicitly if legacy code relies on it: require_once 'vendor/pear/pear-core-minimal/PEAR.php';
  • Dependency for Other PEAR-Based Packages: Many older PEAR packages (e.g., Mail, MDB2, Auth_SASL) declare pear/pear-core in their composer.json—this minimal fork satisfies those requirements cleanly in modern Composer setups.
  • Exception Handling: Use PEAR_Exception for consistent error handling in legacy PEAR-based libraries (still works with try/catch blocks), especially where PEAR::raiseError() was historically used.
  • Phar/Phar-Unsupported Environments: Useful in stripped-down hosting or container environments where system PEAR is absent but PEAR classes are still referenced by dependencies.

Gotchas and Tips

  • Autoloader Conflicts: If using modern namespaced frameworks (e.g., Symfony, Laravel), ensure no Composer autoloading collisions—this package defines only class files, not PSR-4 namespaces; it relies on PHP’s __autoload / spl_autoload_register fallback.
  • Version Confusion: Despite the future release date (2026-01-25), this is likely a typo in metadata—verify actual source code date; treat as stable but unmaintained since PEAR itself is deprecated.
  • Security Note: Avoid using PEAR classes in new code. This package exists only to unblock migration; actively refactor away from PEAR:: methods (e.g., use throw new Exception() instead of PEAR::raiseError()).
  • Extension Point: If debugging fails, inspect PEAR::loadConfig() or PEAR_Config::singleton()—though limited, the minimal set includes config handling basics useful for tools like PEAR-installed PHPCS or PDepend.
  • Fallback Dependency: If composer install fails due to pear/pear-core conflict, this package is often a drop-in replacement—edit your composer.json to require pear/pear-core-minimal instead.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests