webgriffe/payum-lock-request-extension-bundle
Symfony bundle providing a Payum extension that locks payment requests, helping prevent duplicate or concurrent processing of the same payment. Integrates into Payum flows to guard request handling with a lock, reducing risks of double charges and race conditions.
Architecture fit. This is a thin Symfony DI wiring layer for a Payum request-locking extension. It has architectural relevance only if you are already, or are committed to becoming, a Symfony + Payum shop. Payum is a payment-gateway abstraction layer with a declining but real install base (historically strong in the Italian/European e-commerce ecosystem via Sylius and Webgriffe-related projects). The scope of the bundle is narrow by design: it presumably registers Payum actions/decorators and services so request locking is applied around payment capture/authorize operations without bespoke wiring. The underlying problem it addresses is legitimate and expensive-to-get-wrong: concurrent payment operations on the same order (double-submit, retry storms, queue re-delivery, webhook races), which is a direct source of double-charges and refund/chargeback overhead. So the problem statement is high-value even though the package is low-adoption.
Integration feasibility. Feasible but non-trivial, and it is not a drop-in. Requirements you must satisfy before this earns its place:
payum/payum-bundle already configured and at least one gateway exercised end-to-end.symfony/lock (Redis/Valkey or a DB-backed store). This bundle almost certainly assumes — not provides — that store.composer.json diff, not a known-good matrix.Technical risk. This is the dominant concern and it is not about code quality — it is about adoption and survivorship. Signals:
Key questions to put to the maintainer / your own team.
Payment, the gateway token, the order aggregate — and what is the lock key derivation?symfony/lock in ~50 lines of code we own?That last question is the real one. For a package this thin, "build vs. depend" tilts toward building unless the lock-point placement inside Payum's action pipeline is genuinely non-obvious — in which case you are buying design knowledge, not code, and should say so explicitly in the decision record.
Stack fit. Qualifies only for a specific quadrant: Symfony 5.4/6.x/7.x, PHP 8.1+, Payum via PayumBundle, existing order/payment domain model, and an already-provisioned Redis. It is a poor fit for teams using Stripe/PayPal SDKs directly, for Sylius users who should prefer Sylius' own payment-state guards, and for any stack where the payment service is a separate bounded context (lock state would need to live in the payment service, not the Symfony front end).
Migration path. Treat this as an incremental hardening change to an existing flow, not a platform migration.
Compatibility. Verify explicitly: the bundle's Symfony constraint against your pinned version, its Payum version against your PayumBundle, and whether it assumes a specific symfony/lock major. Also check PHP version floor and whether it registers services via attributes/XML/YAML — attribute-based DI registration implies a modern Symfony floor and will fail noisily (but confusingly) on older ones. Where constraints are stale, prefer a local fork with widened constraints over Composer aliasing; you want the widening to be visible in review.
Sequencing. Lock store → observability → report-only → single gateway enforcement → all gateways → tuning. Do not sequence this concurrently with a gateway migration or a Payum major upgrade; you will not be able to attribute failures.
Maintenance. Assume you own this after adoption. Zero stars and zero dependents means the practical maintenance plan is a pinned version plus a named internal owner plus a fork already in place. Budget a quarterly review: Symfony/Payum constraint currency, PHP version floor, and a five-minute read of the upstream diff. Total steady-state cost is low because the code surface is small — but "low" is contingent on it staying small, and a thin wrapper is exactly the kind of package that gets quietly abandoned and then blocks a framework upgrade.
Support. GitHub issues via a single maintainer, on a best-effort basis, with no SLA. For a component in the payment critical path that is a real gap. Mitigate with a commercial support conversation with Webgriffe if you are large enough to matter to them, otherwise by owning the fork outright. Escalation paths must be internal, not external.
Scaling. The bundle does not scale — the lock store does, and it becomes a new stateful singleton in your payment path. Watch:
symfony/lock semantics against a replicated Redis are not obviously safe. If you run active-active payment services, validate this before rollout, or route all payment locking to a single region.Failure modes. Enumerate these in the runbook, with an explicit owner decision on each:
Ramp-up. For a competent Symfony developer the code is a half-day read; the domain is the real cost. Budget roughly one engineer-week to get to "we understand every decision this package makes about locking," and considerably more for whoever must defend the fail-open/fail-closed and TTL choices in an incident review. The knowledge required is less "this bundle" and more "Payum's action pipeline and our payment state machine" — which you should hold internally regardless of whether you adopt this package.
Net recommendation. Do not adopt on the strength of the package. Adopt the pattern, evaluate the spike as a design reference, and be prepared to internalize fifty to three hundred lines of lock wiring that you fully control inside the payment critical path. A 0-star, 0-dependent dependency is acceptable as scaffolding and unacceptable as a black box where the failure mode is a double charge.
How can I help you explore Laravel packages today?