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.
Assessment status: Initial assessment based solely on the 1.1.0 release note: “Created static propriety to disable mutators and some fixes.” No prior assessment or source data existed.
Architecture fit: The package appears to integrate at the Laravel/Eloquent layer, likely affecting model mutator behavior. A static property to disable mutators can be useful for bulk imports, seeders, migrations, or controlled write paths where mutator side effects are undesirable. However, a global/static toggle is process-wide and can conflict with Laravel’s request lifecycle, queued jobs, and Octane-style long-running workers if not carefully reset.
Integration feasibility: Likely feasible as a minor 1.x upgrade via Composer, assuming no undocumented breaking changes. The feature is small in surface area but operationally significant because mutators often enforce business rules such as hashing, encryption, normalization, slug generation, or audit fields.
Technical risk: Medium. Key risks are leaked static state across requests/jobs/tests, data written without expected transformations, unclear scope of “disable mutators,” and ambiguity in the release note. The typo “propriety” likely means “property,” which reinforces the need to inspect source/docs before adoption. “Some fixes” is too vague to assess regression risk.
Key questions: What is the exact API/name and scope of the static property? Is it global, per-model, or per-connection? Does it disable setters only, or also casts/accessors/observers? Is it safe under Octane, queues, and parallel tests? What are the “fixes” in 1.1.0? What Laravel/PHP versions are supported? Are there tests covering disabled-mutator behavior and reset semantics?
Stack fit: Fits a standard Laravel/PHP Composer workflow. Expect a service provider/config publish path if the static property is configurable. TPM should confirm whether the toggle is code-level, config-level, or both.
Migration path: Keep production pinned to the current working version, create a branch for 1.1.0, run the full application test suite, and add targeted tests for mutator-enabled and mutator-disabled paths. If the package is already in use, treat this as a minor upgrade with explicit validation rather than a blind Composer update.
Compatibility: Verify PHP and Laravel support matrix, Octane compatibility, queue-worker behavior, and test-suite isolation. Pay special attention to any code path that writes sensitive or derived fields, because mutators may be responsible for correctness.
Sequencing: First inspect source/docs and confirm the exact static property behavior. Then install 1.1.0 in a non-production environment. Add regression tests for enable/disable/reset behavior. Validate queue and long-running worker scenarios. Deploy behind a feature flag if feasible, monitor data writes, then expand usage.
Maintenance: Minor release, likely low maintenance burden, but the static toggle needs documentation and a reset convention. Without clear lifecycle guidance, teams may misuse it and create hard-to-debug data issues.
Support: Vendor responsiveness and documentation quality are unknown. Because the release note is terse, internal support burden may increase until the feature is documented and tested.
Scaling: The main scaling concern is not throughput but state isolation. In long-running workers or Octane, a static “disable mutators” flag can persist beyond the intended scope and affect unrelated requests or jobs.
Failure modes: Most likely failures are skipped data transformations, inconsistent records, test pollution, queue/job contamination, and subtle multi-tenant or per-model leakage. Rollback should be straightforward via Composer pinning, but data already written while mutators were disabled may require cleanup.
Ramp-up: Low for Laravel developers to understand the concept, moderate for safe operational use. Teams need a short runbook covering when to disable mutators, how to reset the static property, and how to verify that critical model transformations still occur.
How can I help you explore Laravel packages today?