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

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

becklyn/vatin-bundle
====================

Symfony bundle for the VATIN library

2.4.0(4y ago)062MITPHPPHP &gt;=7.4

Since Sep 26Pushed 4y agoCompare

[ Source](https://github.com/Becklyn/vatin-bundle)[ Packagist](https://packagist.org/packages/becklyn/vatin-bundle)[ RSS](/packages/becklyn-vatin-bundle/feed)WikiDiscussions 2.x Synced 1w ago

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

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

[](#vatin-bundle)

[![Build Status](https://camo.githubusercontent.com/a8ed997036bae77240a730bfdfb6f1549bab21ff9caff136f49128a3fb362b90/68747470733a2f2f7472617669732d63692e6f72672f646465626f65722f766174696e2d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ddeboer/vatin-bundle)[![Latest Stable Version](https://camo.githubusercontent.com/5b1db4763c222305c0967c78f91d3053709ae39ab56de74a2243a5c4c77a49a5/68747470733a2f2f706f7365722e707567782e6f72672f646465626f65722f766174696e2d62756e646c652f762f737461626c652e706e67)](https://packagist.org/packages/ddeboer/vatin-bundle)

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. For instance using annotations:

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

class Company
{
    /**
     * @Vatin
     */
    protected $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 $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

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 72.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 ~383 days

Recently: every ~163 days

Total

9

Last Release

1546d ago

Major Versions

1.1.0 → 2.0.02017-01-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1044355?v=4)[Becklyn Studios](/maintainers/becklyn)[@Becklyn](https://github.com/Becklyn)

---

Top Contributors

[![ddeboer](https://avatars.githubusercontent.com/u/89267?v=4)](https://github.com/ddeboer "ddeboer (29 commits)")[![oleg-andreyev](https://avatars.githubusercontent.com/u/1244112?v=4)](https://github.com/oleg-andreyev "oleg-andreyev (7 commits)")[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (2 commits)")[![Selion05](https://avatars.githubusercontent.com/u/21970846?v=4)](https://github.com/Selion05 "Selion05 (1 commits)")[![TNAJanssen](https://avatars.githubusercontent.com/u/2812277?v=4)](https://github.com/TNAJanssen "TNAJanssen (1 commits)")

---

Tags

vattaxbtw

### Embed Badge

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

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

###  Alternatives

[ddeboer/vatin-bundle

Symfony bundle for the VATIN library

29884.1k](/packages/ddeboer-vatin-bundle)[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)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)

PHPackages © 2026

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