PHPackages                             thelia/currency-converter - 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. thelia/currency-converter

ActiveLibrary

thelia/currency-converter
=========================

php 5.4 currency tools

1.0.2(8y ago)1097.8k↑265%22LGPL-3.0+PHPPHP &gt;=5.4.0

Since Nov 10Pushed 8y ago2 watchersCompare

[ Source](https://github.com/thelia/CurrencyConverter)[ Packagist](https://packagist.org/packages/thelia/currency-converter)[ RSS](/packages/thelia-currency-converter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (2)

Currency Converter
==================

[](#currency-converter)

**Currency Converter** is a Library which helps you to convert a number from a currency to an another one. The converter uses *provider* for converting the number. Each provider embed the logic for converting this number.

[![Build Status](https://camo.githubusercontent.com/197abcc979341411d9d640f590955ccc2a556081b4a66b35b6313b6dd9e71813/68747470733a2f2f7472617669732d63692e6f72672f7468656c69612f43757272656e6379436f6e7665727465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/thelia/CurrencyConverter) [![License](https://camo.githubusercontent.com/c3e3bcdbd85ad75ac06e57b1befa59119736fe39b5a3403666eeeda59e8ba7fa/68747470733a2f2f706f7365722e707567782e6f72672f7468656c69612f63757272656e63792d636f6e7665727465722f6c6963656e73652e706e67)](https://packagist.org/packages/thelia/currency-converter) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/1e80ecf1c29b026e987d5944e5556587ce4ce2311bbda0fc5e5e49b83f53bfd7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7468656c69612f43757272656e6379436f6e7665727465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thelia/CurrencyConverter/?branch=master)

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

[](#installation)

**Currency Converter** is still in development and doesn't have stable version for now.

Install **Currency Converter** through [Composer](http://getcomposer.org)

Create a composer.json file in your project with this content :

```
{
    "require": {
        "thelia/currency-converter": "~1.0"
    }

}

```

Usage
-----

[](#usage)

First, instantiate a `Provider` of your choice

```
$provider = new \Thelia\CurrencyConverter\Provider\ECBProvider();

```

Then inject it in the `CurrencyConverter`

```
$currencyConverty = new \Thelia\CurrencyConverter\CurrencyConverter($provider);

```

Your `CurrencyConverter` is now ready to be used. This library works with [ISO Code 4217](http://fr.wikipedia.org/wiki/ISO_4217) currency.

Example :

```
$baseValue = new \Thelia\Math\Number('1');

$convertedValue = $currencyConverter
    ->from('EUR')
    ->to('USD')
    ->convert($baseValue);

echo $baseValue->getNumber(); //1.24

```

Providers
---------

[](#providers)

A provider implements a simple interface and contains all the logic for converting a Number from a Currency to an other one. Most of time a provider will use a webservice for getting the exchange rate between two currencies.

List of available providers :

ProviderDescription[European Central Bank](http://www.ecb.europa.eu/stats/exchange/eurofxref/html/index.en.html)All currencies quoted against the euro (base currency)[My Currency](http://www.mycurrency.net)Almost all currencies.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~528 days

Total

3

Last Release

3153d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2196919?v=4)[thelia](/maintainers/thelia)[@thelia](https://github.com/thelia)

---

Top Contributors

[![lunika](https://avatars.githubusercontent.com/u/767834?v=4)](https://github.com/lunika "lunika (10 commits)")[![gillesbourgeat](https://avatars.githubusercontent.com/u/7335734?v=4)](https://github.com/gillesbourgeat "gillesbourgeat (6 commits)")[![roadster31](https://avatars.githubusercontent.com/u/2197734?v=4)](https://github.com/roadster31 "roadster31 (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thelia-currency-converter/health.svg)

```
[![Health](https://phpackages.com/badges/thelia-currency-converter/health.svg)](https://phpackages.com/packages/thelia-currency-converter)
```

PHPackages © 2026

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