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

Money For Laravel Laravel Package

roundly-consulting/money-for-laravel

Money for Laravel brings precise monetary handling to Laravel apps with an immutable Money value object, Eloquent casts, and Blade formatting helpers. Parse, calculate, and format currency amounts without floating-point errors, keeping prices, totals, and invoices clean and testable.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package appears to provide configurable model resolution plus Laravel model factories. Release 1.0.3 fixes factory behavior so that when a host application swaps a model via configuration or container binding, the factory builds the configured class rather than a hard-coded default. This aligns well with Laravel’s config-driven and service-container-centric architecture, and it supports common host-application patterns such as extending core models, modular replacement, or multi-tenant model variants. For a TPM, the fix improves test and seeder fidelity: host applications can swap models and still rely on package-provided factories.

Integration feasibility: Low integration effort. The change is a patch-level bug fix with no new APIs, migrations, or configuration requirements indicated. Hosts already swapping models should see factories align automatically after a Composer update to ^1.0.3. Hosts not swapping models should see no behavioral change. The main integration work is validating that existing factory states, overrides, and relationships still work with swapped model classes.

Technical risk: Low overall, but not zero. The fix changes which class a factory instantiates when a swap is configured. Risk arises if a swapped model has a different table, fillable set, casts, or relationship contract than the default model; factories may now fail earlier or produce different data. There is also a small risk for hosts that unintentionally depended on the old behavior (factories returning the default model despite a swap), though that behavior is arguably a bug. No breaking changes are signaled by the patch version, but the package’s pre-1.1 status means API stability should still be watched.

Key questions:

  • How is model swapping configured—config file, container binding, or both—and does the factory resolution follow the same path?
  • Does the fix cover all factory entry points (make, create, times, states, sequences, relationship factories)?
  • Which Laravel and PHP versions are supported, and is there a compatibility matrix?
  • What contract must a swapped model satisfy (table name, fillable, casts, relationships) for factories to remain valid?
  • Are there regression tests covering swap scenarios, and are they documented for host teams?
  • Does the change affect seeders that run in production, or only test/dev factory usage?
  • Is there an upgrade guide or changelog entry beyond the release note?

Integration Approach

Stack fit: Standard Laravel/PHP package managed via Composer. It fits applications using PHPUnit or Pest, Eloquent factories, and seeders. It is particularly relevant for teams using model-swap or modular architecture patterns, where host applications replace package models with local subclasses or variants.

Migration path: Update the Composer constraint to ^1.0.3 and refresh the lock file. No database migrations or configuration changes are indicated. After updating, run the full test suite, including tests that exercise factories and seeders. Audit any custom factories or test helpers that manually swapped models before this fix; those workarounds may now be redundant or could conflict.

Compatibility: The release is a patch, so it should be semver-compatible with existing 1.0.x integrations. Confirm the package’s supported Laravel versions and PHP version before updating. Because the fix concerns Eloquent factory behavior, verify there is no conflict with the framework’s own factory guessing or with host-defined factories that extend package factories.

Sequencing:

  1. Create a branch and update the package to 1.0.3.
  2. Run the full test suite, including seeder and factory tests.
  3. Add a regression test that swaps a model and asserts the factory returns the swapped class.
  4. Remove or simplify any manual model-swap workarounds in tests.
  5. Validate in staging, especially if seeders run outside local/test environments.
  6. Document the model-swap contract and factory behavior for the engineering team.
  7. Deploy; production runtime impact is expected to be negligible because factories are primarily used in testing and seeding.

Operational Impact

Maintenance: Low. This patch reduces the need for custom test scaffolding around swapped models. Maintainers should track subsequent 1.0.x releases and confirm the package’s release cadence and changelog quality. Internal documentation should note the supported model-swap mechanism and any model contract requirements.

Support: The package appears open-source; formal vendor support is unknown. A TPM should assign internal ownership for upgrades and ensure the team can debug factory/model mismatches. If the package is business-critical, consider pinning versions and monitoring upstream issues related to model swapping and factories.

Scaling: Factories are used in development, testing, and seeding, so there is no expected runtime scaling impact. Seeder performance should be unchanged. The fix may improve test suite reliability at scale by removing per-test workarounds and reducing false failures caused by factories ignoring swapped models.

Failure modes: The most likely failure mode is a swapped model whose schema or Eloquent contract differs from the default model, causing factory-created records to be invalid or relationships to break. The fix surfaces these mismatches earlier, which is desirable but may require host teams to align their swapped models. Another failure mode is reliance on the previous behavior in existing tests; these should be identified during the test run. Production seeder behavior should be verified if seeders swap models.

Ramp-up: Minimal. Engineers need a short briefing on how model swapping is configured, which models are swappable, and how the package factories resolve the configured model. Add a note to the internal testing guide covering the regression test pattern and the expected model contract. New team members can ramp up through existing Laravel factory knowledge plus the package’s swap configuration documentation.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums