Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Vat Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  1. Dependency resolution. Laravel already requires modern 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.
  2. Runtime. Symfony 2 reached end of life in 2018 (2.8 in Nov 2018), and the code targets the PHP 5.x/7.0 era. Running it on PHP 8.1+ requires patching, at which point you are not "using the package."
  3. Delivery contract. No 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:

  • Is VAT validation a compliance gate (invoice/reverse-charge) or a checkout convenience? This determines the entire risk posture.
  • What is the required behaviour when VIES is unavailable — block the sale, or accept and queue for later verification? (This is the real product requirement, and no package answers it.)
  • Do we need to persist evidence (timestamp, consultation result, requesting MS) for audit retention?
  • Is single-transaction validation sufficient, or do we need bulk re-validation of the customer master?
  • Supply chain: the brief names 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.
  • Is there any Symfony 2 application left in the estate that would justify a bundle at all? (Almost certainly not.)

Integration Approach

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):

  1. Treat as documentation, not a dependency. Do not add it to composer.json. Timebox a half-day spike to confirm the install failure so the decision is evidenced rather than asserted.
  2. Define a domain contract — e.g. 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.
  3. Implement one adapter against VIES directly, using the current REST check-vat-number endpoint (or a maintained VIES client of our choosing). Keep the adapter swappable; tax services change.
  4. Wrap in a Laravel service provider with config for timeouts, retry policy, and base URI. Bind the interface, never the concrete class.
  5. Add decorators: a cache decorator (TTL-based, for UX/rate-limit relief only) and a queue/job path for bulk re-validation and for retry-after-outage.

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.

Operational Impact

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:

  • VIES or an individual member-state service being down (routine, not exceptional) → checkout blocking legitimate B2B buyers, direct revenue loss.
  • False "invalid" from transient faults → wrongly charged VAT or abandoned carts.
  • False "valid" from stale cache → under-collected VAT and audit exposure.
  • Format edge cases: Greek EL vs GR, post-Brexit XI numbers, per-country checksum rules, whitespace/case normalisation.
  • Silent behavioural drift if the upstream schema changes with no release notes and no maintainer.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager