PHPackages                             bambamboole/tools - 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. bambamboole/tools

ActiveLibrary

bambamboole/tools
=================

Tools: tax rates, VAT id validation and more.

0.1.0(today)071↑2646.5%MITPHPPHP ^8.4CI passing

Since Aug 8Pushed todayCompare

[ Source](https://github.com/bambamboole/tools)[ Packagist](https://packagist.org/packages/bambamboole/tools)[ Docs](https://github.com/bambamboole/tools)[ RSS](/packages/bambamboole-tools/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

bambamboole/tools
=================

[](#bambambooletools)

A small toolbox for European commerce plumbing:

- **Tax rates** from the EU [TEDB](https://ec.europa.eu/taxation_customs/tedb/) database (SOAP)
- **VAT id validation** via [VIES](https://ec.europa.eu/taxation_customs/vies/) (SOAP)
- **Exchange rates** from the [ECB reference rates](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html), including full history
- **Currency conversion** built on [brick/money](https://github.com/brick/money)

All amounts and rates are `Brick\Math\BigDecimal` — no floats.

Requirements
------------

[](#requirements)

- PHP 8.4+ with `ext-soap` and `ext-dom`

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

[](#installation)

```
composer require bambamboole/tools
```

Usage
-----

[](#usage)

```
use Bambamboole\Tools\ToolManager;

$tools = new ToolManager();

// VAT rates for a country (TEDB)
$rates = $tools->taxRates()->getTaxRates('DE');

// Validate a VAT id (VIES)
$result = $tools->vatId()->validate('DE123456789');
$result->valid; // bool

// ECB euro reference rates, latest or historical
$day = $tools->exchangeRates()->getExchangeRates();
$day->rate('USD'); // BigDecimal

$day = $tools->exchangeRates()->getExchangeRates(new DateTimeImmutable('2020-03-13'));

// Convert money, incl. cross rates via EUR
use Brick\Math\RoundingMode;
use Brick\Money\Money;

$converter = $tools->currencyConverter();
$converter->convert(Money::of(100, 'USD'), 'GBP', roundingMode: RoundingMode::HalfEven);
```

### Caching

[](#caching)

The tax rate and exchange rate clients accept any `Illuminate\Contracts\Cache\Repository`(usable standalone, no Laravel app required). Fetched feeds are cached in bulk, historical days indefinitely, today's rates for 15 minutes. When the cache store supports atomic locks (Redis, Valkey, memcached, database), concurrent misses are collapsed into a single fetch.

```
use Illuminate\Cache\ArrayStore;
use Illuminate\Cache\Repository;

$cache = new Repository(new ArrayStore());
$rates = $tools->exchangeRates($cache)->getExchangeRates();
```

### Laravel

[](#laravel)

The service provider is auto-discovered and wires everything against your default cache store — inject and go:

```
public function __construct(
    private readonly Bambamboole\Tools\ExchangeRates\ExchangeRatesClient $exchangeRates,
    private readonly Brick\Money\CurrencyConverter $converter,
) {}
```

Or use the auto-discovered `Tools` facade:

```
use Tools;

Tools::taxRates()->getTaxRates('DE');
Tools::vatId()->validate('DE123456789');
Tools::exchangeRates()->getExchangeRates();
Tools::currencyConverter()->convert(...);
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance100

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/547137a6d80cad01ed1dd065b1c6af329d9a23a4134a895cff01e078cc155500?d=identicon)[bambamboole](/maintainers/bambamboole)

---

Top Contributors

[![bambamboole](https://avatars.githubusercontent.com/u/8823695?v=4)](https://github.com/bambamboole "bambamboole (32 commits)")

---

Tags

toolsvattaxesbambamboole

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bambamboole-tools/health.svg)

```
[![Health](https://phpackages.com/badges/bambamboole-tools/health.svg)](https://phpackages.com/packages/bambamboole-tools)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.9M107](/packages/mongodb-laravel-mongodb)[propaganistas/laravel-disposable-email

Disposable email validator

6023.2M7](/packages/propaganistas-laravel-disposable-email)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k1](/packages/mike-bronner-laravel-model-caching)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1349.3k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

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