xola/omnipay-bundle
A Symfony bundle that integrates the Omnipay payment library, providing configurable gateway services and helpers for processing payments through multiple providers with a consistent PHP API.
Architecture fit — poor, and the mismatch is the headline finding. Despite being evaluated as a "Laravel/PHP package," xola/omnipay-bundle is a Symfony bundle, not a Laravel package. Its entire contribution is Symfony-shaped glue: a Bundle subclass, a DependencyInjection\Extension that parses a YAML/XML config tree, compiler passes that tag and wire gateway services, and service definitions consumed by Symfony's container. Laravel has no Kernel::registerBundles(), no config tree builder, and no compiler passes. To use the bundle you would have to install symfony/framework-bundle and a second DI container inside a Laravel application — a parallel bootstrap, a parallel configuration surface, and two competing definitions of "the container." The actual domain value (constructing an Omnipay 3 gateway from an array of credentials and exposing purchase/authorize/capture/refund) is roughly 150–300 lines of code. We would be importing a framework to avoid writing a service provider.
Integration feasibility — likely blocked at dependency resolution. The package requires omnipay/common: ^3.0 plus Symfony components. Laravel 9/10/11 pin Symfony components to 6.x/7.x; a bundle last released in January 2020 will almost certainly constrain symfony/framework-bundle and symfony/dependency-injection to 2.8/3.x/4.x/5.x. That produces a hard Composer conflict, and the only "fix" (downgrading framework components) would break Laravel itself. Realistically the last plausible host is Laravel 8 on Symfony 5 — which is past security-support end-of-life for most organizations. This must be verified with a one-day composer require spike on the actual target application before any design work, but the prior is strongly negative.
Technical risk — high, concentrated in abandonment and blast radius. Signals: 9 stars, 0 dependents, last release 2020-01-22, opportunity score ~1.09. There is no downstream population to surface bugs, no maintainer responsiveness, and no evidence of PHP 8.2/8.3 compatibility work. This code sits directly on the payment path, which is the highest-consequence code in the system: a deprecation-triggered fatal during checkout is a revenue event, and a silently changed gateway request shape is a reconciliation event. Note the distinction: Omnipay 3 itself is a reasonable, framework-agnostic dependency; the risk is isolated to this Symfony adapter, which we do not need.
Key questions for the team:
Stack fit — adopt the dependency, reject the package. The correct landing zone is Omnipay 3 core (league/omnipay) plus only the specific gateway driver packages we need, consumed directly from a Laravel service provider. Omnipay is deliberately framework-agnostic; Laravel's container handles it natively with no adapter required. Treat xola/omnipay-bundle as reference documentation, not a dependency — its gateway-construction and option-mapping logic is a useful sanity check when writing our own config schema.
Migration path:
xola/omnipay-bundle to composer.json. Record the decision and rationale in the ADR so it is not re-litigated.league/omnipay:^3 and one gateway package (e.g. omnipay/stripe) behind a feature branch; confirm PHP 8.2/8.3 compatibility in CI.config/payments.php with per-gateway credential blocks keyed by gateway name, sourced from environment variables / secrets manager — never committed.App\Providers\OmnipayServiceProvider registering a GatewayManager singleton that lazily constructs and caches gateway instances via Omnipay::create($name) and ->initialize($config).PaymentGateway interface (purchase, authorize, capture, refund, void) so calling code never imports Omnipay types directly — this preserves the option to swap to a first-party SDK later.FakeGateway / NullGateway binding for tests and local development so the suite never touches a sandbox endpoint.Compatibility and test matrix: PHP 8.1/8.2/8.3 × Laravel 10/11, plus one sandbox end-to-end per gateway (authorize → capture → refund) in CI against test credentials. Verify each gateway driver's own maintenance status individually; bundle risk and driver risk are independent.
Sequencing and effort: Day 1 — Composer spike on the real app to document the conflict (evidence for the ADR). Days 2–4 — direct Omnipay integration against a sandbox gateway with the interface above. Days 5–6 — provider, config, fake gateway, tests. Week 2+ — idempotency, retry/backoff, webhooks, reconciliation. Total to first production transaction: roughly 1.5–2 engineer-weeks, of which the bundle saves approximately zero.
Maintenance and ownership. Adopting the bundle means owning a fork of abandoned Symfony glue we cannot cleanly run — the worst of both worlds. Skipping it means we own ~200–300 lines of straightforward Laravel code with full test coverage and no upstream dependency. The ongoing cost is not the code; it is tracking Omnipay core and each gateway driver for releases, which is identical in both scenarios. Budget roughly 2–4 hours per quarter for dependency review, plus a defined upgrade window whenever a gateway changes its API.
Support. Zero dependents means zero community surface: no Stack Overflow corpus, no downstream issue reports to learn from, no security advisories routed to us. Any defect becomes an internal investigation. This is acceptable for a wrapper we wrote and understand; it is not acceptable for a framework adapter we did not write.
Scaling. The wrapper is stateless and not the bottleneck — gateway API latency dominates (typically 300–2000 ms per authorization). Under PHP-FPM, synchronous gateway calls block a worker for that duration, so worker pool sizing must account for payment traffic, and low-priority operations (refunds, captures, settlement polling) should be queued rather than executed in the request cycle. Use Guzzle with explicit connect/read timeouts (e.g. 5s/15s), a bounded retry policy, and a circuit breaker per gateway so a slow provider does not exhaust the pool. Horizontal scaling is unaffected.
Failure modes to design against, in priority order:
config/payments.php avoids this.Ramp-up. Low. Omnipay's request/response object model is learnable in about a day, and a Laravel service provider is familiar territory for any mid-level engineer on the team. The bundle offers no ramp-up advantage in Laravel because its documentation and idioms are Symfony-specific and would actively mislead. Plan one onboarding session covering the gateway interface, the fake gateway for local dev, and the on-call runbook for failed captures and reconciliation.
Bottom line. Do not adopt xola/omnipay-bundle. The Laravel/Symfony impedance mismatch, the near-certain Composer conflict with modern Laravel, and the 2020 abandonment date combine to make this a liability rather than an accelerator. Adopt Omnipay 3 core with per-gateway drivers, wrap it in a small internal service provider behind a stable interface, and invest the saved effort in idempotency and reconciliation — the parts that determine whether payments are actually reliable.
How can I help you explore Laravel packages today?