merk/dough
Dough is a lightweight money value object for Laravel and PHP, with currency-aware arithmetic, parsing, formatting, comparisons, and Eloquent casts. Handle prices, totals, taxes, and conversions safely using immutable amounts and avoid floating-point errors. Includes helpers for common money operati...
Consider Dough when:
Look elsewhere when:
To executives: Dough is a small, MIT-licensed Money value object that can reduce floating-point and mutation errors in early financial features at near-zero license cost. However, it was last released in 2016, has limited community traction, and is not a strategic platform bet. Approve it only for low-risk prototypes or internal tools, with a documented migration path to a maintained library before scaling revenue-critical workflows.
To engineering: Dough provides immutable Money arithmetic inspired by Kent Beck’s TDD example, which helps prevent accidental state changes and clarifies domain logic. The trade-off is age and low activity: expect no upstream support, no Laravel integration, and possible PHP compatibility gaps. If adopted, vendor or fork it, isolate it behind an internal Money interface, add comprehensive tests, and plan to replace it with moneyphp/money or brick/money for production-grade needs.
How can I help you explore Laravel packages today?