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

Decimal Mutators Laravel Package

giordanolima/decimal-mutators

Decimal mutators for Laravel Eloquent models that automatically cast, store, and format fixed-point values with configurable precision, keeping monetary and decimal attributes accurate in the database and clean in your application.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature scoping for data-ingestion and bulk-operation workflows. The headline of 1.1.0 — a static property to globally disable mutators — is effectively an escape hatch for paths where automatic attribute transformation gets in the way (seeding, imports, migrations, backfills, queued bulk writes, test fixtures). This lets you decide whether to build that bypass logic yourself or adopt the package's built-in switch.
  • Build vs. buy for model-layer behavior. If your product relies on consistent, centrally-managed attribute mutation (normalization, hashing, formatting, derived fields), the package is a candidate to own that concern. The new global disable toggle is a signal the maintainer is thinking about operational ergonomics, not just happy-path transformation.
  • Testability and debugging as a product requirement. A single global kill switch materially simplifies writing tests that assert raw persisted values and debugging "why did this field change" incidents. Treat this as a quality-of-life feature that lowers the cost of adoption for teams with heavy test suites.
  • Risk posture / roadmap dependency. Because the toggle is static/global state, it directly affects decisions about long-running workers and Octane-style servers, where global flags can leak across requests or jobs. That is a roadmap-relevant constraint: if you run persistent workers, adopting this requires a discipline (set-and-reset around the operation, or scoped alternatives) that must be planned, not assumed.
  • Release cadence and maturity signals. A 1.1.0 with "some fixes" and no detail is a weak changelog signal. It supports a decision to adopt behind a version pin and to require a readable changelog before deeper investment.

When to Consider This Package

Consider it when:

  • You have repeated, non-trivial attribute transformation logic scattered across Eloquent models and want one governed mechanism.
  • You have real bulk/import/backfill paths that must bypass mutation, and you would otherwise hand-roll bypass flags — the built-in static toggle removes that custom code.
  • Your team runs PHPUnit/Pest suites that would benefit from asserting raw column values without unwinding mutators per-test.
  • You can tolerate pre-2.0 API churn and are willing to pin exact versions.

Look elsewhere (or defer) when:

  • You run Octane, Horizon-heavy, or otherwise long-lived processes and cannot guarantee the global flag is reset. Static global state in a shared process is a correctness hazard; prefer a per-model or per-query-scope mechanism, or wrap usage in strict try/finally discipline.
  • Mutator behavior is central to data integrity (e.g., encryption, hashing, PII redaction) and a global off-switch could silently persist unmasked data. A kill switch is a footgun if the wrong caller flips it.
  • You need an auditable changelog. "Some fixes" is not enough to assess regression risk; if your change-management process requires itemized releases, wait for a detailed changelog or read the diff.
  • Framework-native features suffice. Laravel's $casts, accessors/mutators, withoutEvents-style patterns, or query-builder bulk inserts may already cover your bypass needs without a third-party dependency.
  • The package is early and thinly documented — verify the static property's scope (global vs. per-connection), reset semantics, and interaction with queued serialization before committing.

How to Pitch It (Stakeholders)

For executives: This is a small, focused Laravel library that standardizes how model attributes get transformed, and its new 1.1.0 release adds a single global switch to turn that transformation off when we need raw data — during imports, backfills, and testing. It's a candidate to replace bespoke per-model logic with one maintained mechanism, reducing custom code we'd otherwise own. The trade-off is maturity: it's a 1.x package with a terse changelog, so we'd adopt it pinned to a version, behind our own tests, and with an explicit rule about when the global switch may be used.

For engineering: 1.1.0 introduces a static property to disable mutators globally, plus unspecified fixes. The win is a supported bypass path for seeding/imports/bulk writes and simpler raw-value assertions in tests. The risk is global mutable state: in Octane or long-running queue workers it can leak between requests and jobs, and an accidental flip could persist unmutated sensitive fields. Recommendation: adopt with an exact version pin, always wrap toggling in try/finally (or a helper), add a lint/test guard that asserts the flag is false at request/job boundaries, and read the 1.1.0 diff before merging since the changelog does not enumerate the fixes.

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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel