toneflix-code/laravel-pay-pocket
Laravel Pay Pocket is a lightweight Laravel package for adding wallet and payment functionality to your application. It provides simple APIs for managing balances, transactions, and payment flows, making it easy to integrate secure pay-ins and payouts.
toneflix/laravel-pay-pocket is a Laravel wallet/balance abstraction (publishable config + migrations, a service provider, and model traits for ledger-style account balances). Architecturally it fits Laravel applications that need an in-app wallet/ledger primitive without adopting a full payment orchestration platform — it is a library, not a service, so it inherits the host app's database, queue, and caching characteristics.
Release 4.0.0 is a hard-breaking release on three axes:
toneflix-code/laravel-pay-pocket → toneflix/laravel-pay-pocket.ToneflixCode\LaravelPayPocket → Toneflix\LaravelPayPocket, which affects application imports, the published config, and any published migrations/models that reference the namespace, plus any polymorphic/morph-map or serialized class names persisted in the database or in queued job payloads.^8.3|^8.4 and Illuminate ^12.0|^13.0. This drops Laravel 10/11 and PHP 8.1/8.2 consumers entirely; there is no compatibility shim or bridge release.Integration feasibility is straightforward on a modern stack (composer remove / composer require, then a namespace sweep), but the blast radius is wider than the README's two-line upgrade implies: the vendor rename breaks Composer lockfiles, internal allowlists/private mirrors, SBOM and license-scanning entries, and any CI caching keyed on the old vendor name.
Technical risks worth flagging:
Key questions for the maintainer:
Stack fit. Suitable only for services already on Laravel 12 with PHP 8.3+, or services that can complete a framework upgrade first. Any service on Laravel 10/11 or PHP 8.1/8.2 is blocked and should not attempt this release.
Migration path. The realistic path is a coordinated, single-PR upgrade per service:
toneflix/laravel-pay-pocket:^4.0.app/, config/, database/migrations/, tests/, and any seeders/factories.vendor:publish) and diff against the existing published file — do not blindly overwrite; local customizations (table names, models, currency config) must be reconciled.composer dump-autoload -o.Compatibility. Watch specifically for:
__PHP_Incomplete_Class). Drain queues before cutover, or accept and replay failures.Sequencing. Pin ^3.0 and freeze feature work on the wallet module while the framework upgrade lands. Then do the package bump in a dedicated release behind a feature flag if the wallet is on a critical path. Roll out to a staging environment with a production-shaped dataset (real transaction volume, not fixtures) before any canary. Where possible, use a blue/green deploy rather than rolling, since a rolling deploy will briefly run old and new namespaces against the same database.
Maintenance. The vendor move is the durable cost: internal dependency inventories, SBOM entries, license scans, artifact allowlists, private mirror configs, and any security-alert routing keyed on toneflix-code/* must be updated. If the organization has a package approval process, the new vendor name is a new dependency and may need re-approval even though the code is unchanged.
Support. Single-maintainer, low-visibility package handling money-adjacent logic. The README and CI matrix were updated, which is a good signal, but there is no stated LTS or deprecation policy, and the 3.x support window is undocumented. Budget for the possibility of forking or vendoring if the project stalls.
Scaling. Unchanged by this release — the package still executes balance mutations inside the host application's transaction boundaries. Concurrency behavior under load (row locking, deadlock retries, idempotency of wallet operations) is a pre-existing concern and should be validated with a load test against realistic contention, not assumed from the version bump. If wallet writes are high-frequency, confirm index coverage on the ledger tables in the published migrations.
Failure modes to plan for.
Class not found from stale opcache/config cache or un-swept namespace references.Ramp-up. Low conceptual learning curve — engineers need roughly half a day to a day per service for the namespace sweep, config reconciliation, and regression testing of deposit/withdraw/transfer/balance flows. The real cost is coordination: the framework upgrade must land first, which makes this a multi-week program for any organization with several Laravel services rather than a single sprint task. Recommend one engineer own the migration playbook across services so the config-diff and morph-map checks are done identically everywhere.
How can I help you explore Laravel packages today?