sparkling/vat-bundle
sparkling/vat-bundle is a Symfony bundle for validating EU VAT numbers through the VIES service, with ready-to-use validators and services that make it easy to add VAT checks to checkout, onboarding, or other PHP application workflows.
Architecture fit — poor, and categorically so. The first finding is a framing correction: this is not a Laravel/PHP package. It is a Symfony 2 bundle, distributed as a bundle (DI extension class, XML/YAML service definitions, registration in AppKernel). A bundle is not a reusable library in the Composer/PSR-4 sense — its unit of integration is the Symfony kernel. Laravel has no kernel hook for bundles, no bundle registration, and no way to consume the DI extension. The genuinely reusable content is a thin capability: take a VAT number, call VIES over SOAP, return validity. That is a few hundred lines of value wrapped in an incompatible delivery format.
Integration feasibility — effectively zero without a rewrite. Three independent blockers:
symfony/* components (console, http-foundation, process, etc. at v6/v7). A bundle pinned to Symfony 2.x components cannot co-resolve in the same Composer graph. This alone is usually fatal before any code runs.ServiceProvider, no facade, no config publishing, no container bindings — the Laravel-native integration surface is entirely absent.Technical risk — high, and it lands on a compliance path. Last release 2018-09-11, archived, 26 stars, 0 dependents. Zero dependents is the loudest signal: no third party is running this in production, so there is no de facto field testing, no security monitoring, no CVE coverage, and no community to answer questions. Layered on top: EU VAT validation is not a cosmetic feature. It underpins B2B reverse-charge treatment and invoice validity, and auditors expect evidence of validation at time of supply plus controlled change management. An archived dependency on a tax-determination path will fail change-control and audit review on its own merits, independent of whether the code works. VIES itself has also moved on (REST check endpoints, member-state availability endpoints, post-Brexit coverage for XI/Northern Ireland, Greek EL vs GR formatting), so the bundle's protocol assumptions are stale.
Key questions for the business:
sparkling/vat-bundle while the repo is ruudk/VATBundle — if this is a third-party fork, who maintains it, and what is the delta from the archived upstream? Adopting an unattributed fork of an archived bundle is a compounding risk.Stack fit: none at the framework layer, partial at the domain layer. Nothing installs. The only legitimate use is as a reference implementation — read its VIES request/response handling to understand field shapes and error codes, then close the tab.
Recommended migration path (build, don't adopt):
composer.json. Timebox a half-day spike to confirm the install failure so the decision is evidenced rather than asserted.VatValidator::validate(string $countryCode, string $number): VatValidationResult — owned by our codebase, returning a value object with status (valid / invalid / unavailable / format-error), consulted-at timestamp, and the member-state response code.check-vat-number endpoint (or a maintained VIES client of our choosing). Keep the adapter swappable; tax services change.Compatibility: target PHP 8.2/8.3 and current Laravel LTS. Require ext-soap or an HTTP client — strongly prefer HTTP (Guzzle/Http::) over SOAP so the same client is testable and observable with the tooling the team already uses.
Sequencing (est. ~1 week for one engineer): Day 0–0.5 install spike and decision record → Day 1 contract + adapter with recorded VIES fixtures as contract tests → Day 2–3 resilience layer (timeout, retry with backoff, circuit breaker, cache, queue) → Day 4–5 persistence for evidence retention, logging, metrics, and a documented fallback policy signed off by Finance/Tax.
Do not fork the bundle to "modernise" it. Resurrecting a Symfony 2 bundle for a Laravel app costs more than the adapter it replaces and leaves you owning unfamiliar code on a compliance path.
Maintenance: Zero upstream. Archived + MIT means no patches arrive, ever — including for VIES protocol drift. Any fork we create is permanently ours, which converts a 300-line adapter into an unbounded maintenance liability.
Support: No vendor, no community, 26 stars, 0 dependents. During an incident, the escalation path is our own engineers reverse-engineering EU member-state quirks. Compare to a ~200-line in-house adapter the on-call engineer can read in ten minutes.
Scaling: The code is not the bottleneck; VIES is. It publishes no SLA, throttles aggressively at a global level, and routinely returns GLOBAL_MAX_CONCURRENT_REQ / MS_MAX_CONCURRENT_REQ faults. Bulk customer-master re-validation must be queued and rate-limited, never inline. Cache aggressively for interactive UX, but note the trap: caching a validity answer is not the same as retaining validation evidence — store the consultation result with its timestamp for compliance; use the cache only to avoid redundant round-trips.
Failure modes to design for explicitly:
EL vs GR, post-Brexit XI numbers, per-country checksum rules, whitespace/case normalisation.Ramp-up: Negligible for the package (it will not install); roughly 1–2 days for a mid-level engineer to build and test the adapter. The real ramp cost is domain knowledge — EU VAT rules, reverse-charge mechanics, evidence retention, and the fallback policy — which must come from Finance/Tax, not from code.
Recommendation: Do not adopt. The score of 0.17 is directionally correct. Use the source as a VIES reference at most, and deliver the capability as a small, owned, observable adapter behind a Laravel service provider.
How can I help you explore Laravel packages today?