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

ActiveSymfony-bundle

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

Symfony bundle for the VATIN library

4.1.0(2mo ago)29884.1k—7.5%12[1 issues](https://github.com/ddeboer/vatin-bundle/issues)MITPHPPHP &gt;=8.1CI passing

Since Sep 26Pushed 2mo 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 1mo 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

63

—

FairBetter than 99% of packages

Maintenance86

Actively maintained with recent releases

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

67d 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

[sulu/sulu

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

1.3k1.3M152](/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.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19280.3k3](/packages/symfony-ux-cropperjs)

PHPackages © 2026

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