sandwich/vies-bundle
Validate EU VAT numbers through the official VIES service with sandwich/vies-bundle. It wraps VIES lookups in a configurable PHP API with error handling and framework integration, making it easy to check VAT registration status reliably in your application.
Architecture fit
The package is a Symfony bundle, not a Laravel package — this is the first thing to resolve, because the brief frames it as a Laravel/PHP dependency and it is not. What it actually provides is narrow: a Symfony DI extension, configuration tree, and service definitions that wire the underlying sandwich/vies client into a Symfony container. None of that container plumbing is portable to Laravel's service container. The domain logic — a SOAP call to the EU VIES service and a response object — lives in the underlying library, which is framework-agnostic PHP and is the only part we would realistically consume.
Release 2.2 does not change this. It adds Symfony 6 container support (PR #15, first-time contributor), which is a constraint bump on the bundle's Symfony components range and touches nothing in the domain layer. In a Laravel application the bundle's Symfony constraint is dead weight either way, so the release has zero effect on architecture fit. Architecturally this remains a thin adapter over a legacy SOAP endpoint: no persistence, no queueing, no caching, no resilience layer. In a Laravel codebase it belongs behind our own VatValidator contract, with the library as one swappable adapter implementation.
Integration feasibility
Low technical effort, moderate governance effort — unchanged. MIT license, small API surface, pure PHP. We install the underlying library, bind it in a service provider, and expose it through a facade in well under a day. The bundle itself should still not be installed in a Laravel app; 2.2 makes it installable on newer Symfony, which is not a reason to install it. Pulling in a Symfony bundle for container wiring we will not use adds a dependency for zero benefit and creates confusion for future maintainers.
The one integration-relevant fact to verify: a Symfony 6 constraint implies PHP 8.0+ in the bundle's own CI, which is suggestive but not proof that sandwich/vies is compatible with our runtime. Confirm the underlying library's PHP constraint directly rather than inferring it from the bundle's release.
Technical risk
The risk here is not code quality, it is project health and upstream volatility. The 2.2 release moves one signal but not the conclusion:
sandwich/vies. Release 2.2 says nothing about the underlying client — no companion version bump, no changelog entry — so we cannot tell from the notes whether the client has moved. If that library lags PHP versions or stops tracking VIES SOAP changes, the bundle cannot compensate.Key questions
MS_UNAVAILABLE SOAP faults? Collapsing those two into false is a correctness bug in a billing path.sandwich/vies version constraints now that the Symfony range has moved? Does the underlying client clear our minimum PHP, or has the bundle simply widened its own constraint around a stale dependency?GB numbers no longer validating via VIES, and XI (Northern Ireland) numbers that do?Stack fit
Poor as packaged, adequate as a library. Do not install sandwich/vies-bundle in the Laravel application, including 2.2 — the Symfony 6 support is the only change and it is the part we do not want. Install the underlying sandwich/vies client instead, or evaluate a maintained alternative before committing. A short build-versus-buy spike remains warranted: a hand-rolled SOAP client against VIES is roughly 150 lines and removes the dependency risk entirely; a commercial VAT validation API removes both the dependency and the availability risk at a per-call cost.
Migration path
VatValidator interface returning a result object with status (valid / invalid / unavailable / malformed), normalized VAT number, member state, consultation number, and raw response.ViesValidator adapter wrapping the underlying library. If we later build our own client or buy a provider, only this class changes.VatServiceProvider, configured from config/vat.php (timeouts, cache TTL, driver).unavailable results.Compatibility
The bundle's Symfony constraints are irrelevant in Laravel, and 2.2 only widens them. The underlying library's PHP constraint is what matters — verify it against our runtime before the spike, and do not assume the bundle's Symfony 6 compatibility implies it. Laravel already ships Symfony components, so no conflict is expected at the component level.
Sequencing
Spike (half day, now also confirming the sandwich/vies PHP constraint post-2.2) → interface and result DTO (half day) → adapter plus tests against recorded VIES fixtures (one day) → caching and fallback decorators (one day) → integrate at the single call site that needs it. Ship the interface first even if the adapter is temporary; the abstraction is the durable asset, the dependency is not.
Maintenance
Assume we own this. A single compatibility patch after a two-year gap does not change that: no dependents means no downstream pressure to fix anything, so plan to fork or vendor the adapter if it breaks. Budget a small recurring line item for dependency review each PHP upgrade cycle, and add the package to whatever policy we use for unpinned or unmaintained dependencies. Record 2.2 in the dependency log as "compatibility patch only — no functional or compliance-relevant change," so the next reviewer does not mistake it for a health reset.
Support
No commercial support, no maintainer SLA, no published support window. Escalation for VIES itself does not exist either — the European Commission publishes status per member state, which is the best signal available. Our on-call runbook should point at that, not at the package.
Scaling
VIES is synchronous SOAP, typically hundreds of milliseconds to multiple seconds per call, with throttling under burst load. Never call it inline on a checkout or registration request without a hard timeout and a defined degraded behaviour. The realistic pattern is: validate asynchronously on capture, cache aggressively, and re-validate only on a schedule or at the point of invoicing. Read-heavy workloads are fine once cached; write-heavy onboarding flows need a queue.
Failure modes
MS_UNAVAILABLE — must not be treated as an invalid VAT number.Ramp-up
For the team, negligible — a competent Laravel engineer is productive with the adapter in a day. The actual ramp-up cost is domain literacy: understanding that "valid VAT number" and "valid evidence for a zero-rated supply" are different things, and that the audit artefact needs to be stored, not just checked. That is the part worth a TPM-owned decision record and a review with finance before we wire this into a billing path.
How can I help you explore Laravel packages today?