php-decimal/stubs
IDE and static analysis stubs for the PHP Decimal extension. Provides PHP method/function signatures to improve autocompletion and type checking without requiring the extension source. For installing the actual extension, see php-decimal/php-decimal.
php-decimal extension for high-precision arithmetic (e.g., banking, e-commerce, or scientific computing) by providing IDE autocompletion and static analysis support.php-decimal extension by offering IDE-friendly stubs (e.g., PhpStorm, VSCode) for type hints, method signatures, and documentation.php-decimal extension today.php-decimal extension, saving dev time while maintaining compatibility with existing PHP tooling.Adopt if:
float/double types are insufficient.php-decimal extension.php-decimal into a greenfield or legacy project and need to ensure IDE/tooling compatibility from day one.php-decimal API.Look elsewhere if:
php-decimal extension (this is purely a stub package; the core library is php-decimal/php-decimal).bcl/libphpdecimal, gmp, or JavaScript-based solutions for hybrid apps)."This lightweight package enables our engineering team to leverage the php-decimal extension—critical for precise financial calculations—without sacrificing developer productivity. By providing IDE autocompletion and static analysis support, we reduce bugs in decimal-heavy workflows (e.g., payments, audits) and accelerate onboarding for new hires. It’s a no-code, low-risk dependency that future-proofs our stack against floating-point inaccuracies, aligning with our [precision/accuracy] goals."
"The php-decimal/stubs package is a free, MIT-licensed companion to the php-decimal extension that plugs into our existing PHP tooling (PHPStan, IDEs, etc.). It eliminates ‘unknown class/method’ warnings and speeds up development by surfacing the extension’s API in real-time. Since it’s maintained by the same team as the core library, we get updates for free. Tradeoff: Minimal overhead (just a composer require), but critical for teams using php-decimal in production. Recommend adopting if we’re committed to the extension long-term."
*"If you’re using php-decimal and tired of IDE red squiggles or static analysis errors, this package adds type hints and method stubs so your editor treats the extension like a first-party PHP class. Example:
use Decimal\Decimal;
$amount = new Decimal('123.456'); // No more 'Class not found' errors!
It’s a 5-minute setup (composer require php-decimal/stubs) with zero runtime impact—just better dev experience."*
How can I help you explore Laravel packages today?