PHPackages                             ddeboer/vatin-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. ddeboer/vatin-bundle

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

ddeboer/vatin-bundle
====================

Symfony bundle for the VATIN library

4.1.0(3mo ago)29933.2k↓52.4%12[1 issues](https://github.com/ddeboer/vatin-bundle/issues)MITPHPPHP &gt;=8.1CI failing

Since Sep 26Pushed 3mo ago4 watchersCompare

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

READMEChangelog (10)Dependencies (28)Versions (13)Used By (0)

VATIN bundle
============

[](#vatin-bundle)

[![Packagist Version](https://camo.githubusercontent.com/8adaf23ea4bf4142776e2432d9815ba22eaaf934d8c2b50dbc765ad106d15482/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646465626f65722f766174696e2d62756e646c65)](https://camo.githubusercontent.com/8adaf23ea4bf4142776e2432d9815ba22eaaf934d8c2b50dbc765ad106d15482/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646465626f65722f766174696e2d62756e646c65)

A Symfony bundle for the [VATIN library](https://github.com/ddeboer/vatin).

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

[](#installation)

This library is available on [Packagist](https://packagist.org/packages/ddeboer/vatin-bundle):

```
composer require ddeboer/vatin-bundle
```

Then add the bundle to your application:

```
// app/AppKernel.php
public function registerBundles()
{
    return [
        ...
        new Ddeboer\VatinBundle\DdeboerVatinBundle(),
        ...
    ];
}
```

Usage
-----

[](#usage)

### Validate number format

[](#validate-number-format)

Use the validator to validate a property on your models.

```
use Ddeboer\VatinBundle\Validator\Constraints\Vatin;

class Company
{
    #[Vatin]
    protected string $vatNumber;
```

Symfony’s validator will now check whether `$vatNumber` has a valid VAT number format. For more information, see [Symfony’s documentation](http://symfony.com/doc/current/book/validation.html).

### Validate number existence

[](#validate-number-existence)

Additionally, you can check whether the VAT number is in use:

```
    use Ddeboer\VatinBundle\Validator\Constraints\Vatin;

    #[Vatin(checkExistence=true)]
    protected string $vatNumber;
```

The validator will now check the VAT number against the [VAT Information Exchange System (VIES)](http://ec.europa.eu/taxation_customs/vies/faq.html)SOAP web service. This service’s availability is rather unreliable, so it’s a good idea to catch the case where it’s unreachable:

```
use Symfony\Component\Validator\Exception\ValidatorException;

try {
    if ($validator->isValid()) {
        // Happy flow
    }
} catch (ValidatorException $e) {
    // VAT could not be validated because VIES service is unreachable
}
```

### Using the services directly

[](#using-the-services-directly)

You can also use this bundle’s services directly. Validate a VAT number’s format:

```
$validator = $container->get('ddeboer_vatin.vatin_validator');
$bool = $validator->isValid('NL123456789B01');
```

Additionally, check whether the VAT number is in use:

```
$bool = $validator->isValid('NL123456789B01', true);
```

To interact with the VIES webservice:

```
$vies = $container->get('ddeboer_vatin.vies.client');
$checkVatResponse = $vies->checkVat('NL', '123456789B01');
```

More information
----------------

[](#more-information)

For more information, see the [VATIN library’s documentation](https://github.com/ddeboer/vatin).

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance79

Regular maintenance activity

Popularity50

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 76.2% 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 ~413 days

Recently: every ~363 days

Total

12

Last Release

113d ago

Major Versions

1.1.0 → 2.0.02017-01-25

2.3.0 → 3.0.02022-03-19

3.1.1 → 4.0.02025-02-27

PHP version history (2 changes)3.0.0PHP &gt;=7.2

4.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/54c045456672a15a85dd65e79418d0f3375322df38ac4dedb5d66487d86ab592?d=identicon)[ddeboer](/maintainers/ddeboer)

---

Top Contributors

[![ddeboer](https://avatars.githubusercontent.com/u/89267?v=4)](https://github.com/ddeboer "ddeboer (32 commits)")[![Lustmored](https://avatars.githubusercontent.com/u/2358046?v=4)](https://github.com/Lustmored "Lustmored (2 commits)")[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (2 commits)")[![TNAJanssen](https://avatars.githubusercontent.com/u/2812277?v=4)](https://github.com/TNAJanssen "TNAJanssen (2 commits)")[![oleg-andreyev](https://avatars.githubusercontent.com/u/1244112?v=4)](https://github.com/oleg-andreyev "oleg-andreyev (1 commits)")[![mhpcc](https://avatars.githubusercontent.com/u/50452722?v=4)](https://github.com/mhpcc "mhpcc (1 commits)")[![aleho](https://avatars.githubusercontent.com/u/138721?v=4)](https://github.com/aleho "aleho (1 commits)")[![Selion05](https://avatars.githubusercontent.com/u/21970846?v=4)](https://github.com/Selion05 "Selion05 (1 commits)")

---

Tags

vattaxbtw

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ddeboer-vatin-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M386](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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