PHPackages                             ibericode/vat-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ibericode/vat-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

ibericode/vat-bundle
====================

Bundle for using ibericode/vat in a Symfony environment

2.3.0(3mo ago)21275.7k↓62.8%9[1 issues](https://github.com/ibericode/vat-bundle/issues)MITPHPPHP &gt;=8.2CI failing

Since Feb 7Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/ibericode/vat-bundle)[ Packagist](https://packagist.org/packages/ibericode/vat-bundle)[ RSS](/packages/ibericode-vat-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (9)Versions (19)Used By (0)

VAT Bundle
==========

[](#vat-bundle)

[![Build Status](https://github.com/ibericode/vat-bundle/actions/workflows/php.yml/badge.svg)](https://github.com/ibericode/vat-bundle/actions/runs/5474441948)[![Latest Stable Version](https://camo.githubusercontent.com/e823a41d2bbdfd423b70ec64e8dad806f0430f5b083957f7b92197665846984f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6962657269636f64652f7661742d62756e646c652e737667)](https://packagist.org/packages/ibericode/vat-bundle)[![PHP from Packagist](https://camo.githubusercontent.com/d8fd3c15c579bc4028c12d46bac3d7354b8b74c71139910d8a730f14460ac34c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6962657269636f64652f7661742d62756e646c652e737667)](https://camo.githubusercontent.com/d8fd3c15c579bc4028c12d46bac3d7354b8b74c71139910d8a730f14460ac34c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6962657269636f64652f7661742d62756e646c652e737667)[![Total Downloads](https://camo.githubusercontent.com/f6bb4417569639cbb6a4b925fc023ffa5ea885f9e362d564b34ead3cf5957c02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6962657269636f64652f7661742d62756e646c652e737667)](https://camo.githubusercontent.com/f6bb4417569639cbb6a4b925fc023ffa5ea885f9e362d564b34ead3cf5957c02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6962657269636f64652f7661742d62756e646c652e737667)[![License](https://camo.githubusercontent.com/de119cdf46ed304efee63979e9c1254035c2ea4f4ecdf629773e2af22b194031/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6962657269636f64652f7661742d62756e646c652e737667)](https://camo.githubusercontent.com/de119cdf46ed304efee63979e9c1254035c2ea4f4ecdf629773e2af22b194031/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6962657269636f64652f7661742d62756e646c652e737667)

This bundle allows you to use [ibericode/vat](https://github.com/ibericode/vat) in your [Symfony](https://symfony.com/) projects.

- Fetch VAT rates for any European member state from [ibericode/vat-rates](https://github.com/ibericode/vat-rates)
- Validate VAT numbers (by format and existence)
- Validate ISO-3316 alpha-2 country codes
- Determine whether a country is part of the EU
- Geo-locate IP addresses

The official [VIES VAT number validation](http://ec.europa.eu/taxation_customs/vies/) SOAP API is used for validating VAT numbers.

Installation
------------

[](#installation)

First, install the bundle using Composer.

```
composer require ibericode/vat-bundle

```

Then, load the bundle by adding it to your `config/bundles.php` file.

```
Ibericode\Vat\Bundle\VatBundle::class => ['all' => true]
```

Usage
-----

[](#usage)

Check out [ibericode/vat](https://github.com/ibericode/vat) for direct usage examples. This bundle adds service configuration &amp; a validation constraint for VAT numbers.

### Dependency injection

[](#dependency-injection)

With this bundle enabled, you can use dependency injection to retrieve a class instance for the `Countries`, `Validator`, `Rates` or `Geolocator` classes.

```
use Ibericode\Vat\Countries;
use Ibericode\Vat\Validator;
use Ibericode\Vat\Rates;
use Ibericode\Vat\Geolocator;

class MyController
{
    /**
     * Type-hint the class on your service constructors to retrieve a class instance
     */
    public function __construct(
        Rates $rates,
        Validator $validator,
        Countries $countries,
        Geolocator $geolocator
        )
    {
        $rates->getRateForCountry('NL'); // 21.00
        $validator->validateVatNumber('NL123456789B01'); // false
        $countries->isCountryCodeInEU('US') // false
        $geolocator->locateIpAddress('8.8.8.8'); // US
    }
}
```

### Validation

[](#validation)

To validate a VAT number using Symfony's [Validation](https://symfony.com/doc/current/validation.html) component, you can use the `VatNumber` constraint.

```
use Ibericode\Vat\Bundle\Validator\Constraints\VatNumber;

class Customer
{
    /**
    * @VatNumber()
    */
    public $vatNumber;
}
```

License
-------

[](#license)

MIT licensed. See the [LICENSE](LICENSE) file for details.

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance81

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 80.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~153 days

Recently: every ~39 days

Total

18

Last Release

92d ago

Major Versions

0.1 → 2.02019-02-11

PHP version history (5 changes)0.1PHP ^7.1

2.0.2PHP &gt;=7.1

2.0.9PHP &gt;=8.0

2.1.0PHP &gt;=8.1

2.2.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/885856?v=4)[Danny van Kooten](/maintainers/dannyvankooten)[@dannyvankooten](https://github.com/dannyvankooten)

---

Top Contributors

[![dannyvankooten](https://avatars.githubusercontent.com/u/885856?v=4)](https://github.com/dannyvankooten "dannyvankooten (62 commits)")[![arneee](https://avatars.githubusercontent.com/u/1255879?v=4)](https://github.com/arneee "arneee (3 commits)")[![lowerends](https://avatars.githubusercontent.com/u/6588791?v=4)](https://github.com/lowerends "lowerends (3 commits)")[![thomas-hiron](https://avatars.githubusercontent.com/u/4216436?v=4)](https://github.com/thomas-hiron "thomas-hiron (3 commits)")[![VincentLanglet](https://avatars.githubusercontent.com/u/9052536?v=4)](https://github.com/VincentLanglet "VincentLanglet (2 commits)")[![jkobus](https://avatars.githubusercontent.com/u/1527096?v=4)](https://github.com/jkobus "jkobus (2 commits)")[![RobinHoutevelts](https://avatars.githubusercontent.com/u/9056689?v=4)](https://github.com/RobinHoutevelts "RobinHoutevelts (1 commits)")[![benconda](https://avatars.githubusercontent.com/u/20043165?v=4)](https://github.com/benconda "benconda (1 commits)")

---

Tags

euphpsymfonyvatvat

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ibericode-vat-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ibericode-vat-bundle/health.svg)](https://phpackages.com/packages/ibericode-vat-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
