Weave 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

Dough Laravel Package

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...

Deep Wiki
Context7

Product Decisions This Supports

  • Financial feature scoping: informs whether pricing, checkout, invoicing, refunds, subscriptions, or internal ledgers should use a dedicated Money value object instead of raw floats or integers. Dough’s immutable design reduces rounding and mutation bugs, making it useful for prototypes, internal admin flows, and TDD-oriented implementations.
  • Build vs. buy: a tiny MIT-licensed package lowers initial build cost, but the 2016 last release and low community activity shift the real decision toward “adopt with a maintenance plan” or “vendor/fork” rather than treating it as a long-term strategic dependency.
  • Roadmap sequencing: can unblock early money-handling requirements without committing to a full financial domain layer; however, multi-currency, allocation, formatting, parsing, and exchange-rate needs should be scheduled with a maintained library or internal service.
  • Use cases: simple single-currency carts, invoice line items, ledger-like calculations, legacy PHP services, and educational/reference implementations. It is not a fit for regulated payments, high-volume billing, or complex tax/currency scenarios without additional controls.
  • Risk trade-off: adopting Dough signals a preference for simplicity and immutability over ecosystem support; the PM should pair adoption with a documented exit plan to a maintained alternative such as moneyphp/money or brick/money.

When to Consider This Package

Consider Dough when:

  • You need a minimal immutable Money primitive in a small PHP/Laravel service and can tolerate a package with no recent releases.
  • Your team is willing to vendor or fork the code, own upgrades, and wrap it behind an internal interface.
  • The application is single-currency or has simple arithmetic needs—add, subtract, multiply, compare—and does not require advanced allocation, parsing, formatting, or exchange rates.
  • You value the Kent Beck TDD lineage for teaching, testing, or low-risk internal tooling.
  • PHP version compatibility has been verified against your runtime; Laravel integration is not required or can be adapter-built.

Look elsewhere when:

  • You need active maintenance, security patches, modern PHP support, or Laravel-native integration.
  • You require multi-currency handling, currency conversion, money allocation, locale formatting, parsing user input, or compliance-grade auditability.
  • The feature is customer-facing, revenue-critical, or high-volume; choose a maintained library such as moneyphp/money or brick/money, or build an internal domain service with clear SLAs.
  • You cannot accept the operational overhead of owning a dormant dependency.

How to Pitch It (Stakeholders)

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.

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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route