PHPackages                             egangloff/yii2-currencyconverter - 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. [API Development](/categories/api)
4. /
5. egangloff/yii2-currencyconverter

ActiveLibrary[API Development](/categories/api)

egangloff/yii2-currencyconverter
================================

Currency Converter using Fixer.io API

037PHP

Since Jul 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/egangloff/yii2-currencyconverter)[ Packagist](https://packagist.org/packages/egangloff/yii2-currencyconverter)[ RSS](/packages/egangloff-yii2-currencyconverter/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-currencyconverter
======================

[](#yii2-currencyconverter)

A Yii2 currency converter, based on Fixer.io API

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist egangloff/yii2-currencyconverter "dev-master"

```

or add

```
"egangloff/yii2-currencyconverter": "dev-master"

```

to the require section of your `composer.json` file.

Configuration
-------------

[](#configuration)

Config *console* modules in `console/config/main.php`

```
'bootstrap' => ['currencyconverter'],
'modules' => [
    'currencyconverter' => [
        'class' => 'egangloff\currencyconverter\CurrencyConverter',
        'access_key' => 'FIXER.IO API KEY',
        'currencies' => [
		'THB'=>'&#3647;',
		'USD'=>'&#036;',
		'EUR'=>'&euro; ',
		'CNY'=>'&yen;',
    ...
	],
        'currency_source' => 'THB',
    ],
],

```

Config *frontend* modules and components in `frontend/config/main.php`

```
'modules' => [
    'currencyconverter' => [
        'class' => 'egangloff\currencyconverter\CurrencyConverter',
        'access_key' => 'FIXER.IO API KEY',
        'currencies' => [
		'THB'=>'&#3647;',
		'USD'=>'&#036;',
		'EUR'=>'&euro; ',
		'CNY'=>'&yen;',
    ...
	],
        'currency_source' => 'THB',
    ],
],
'components' => [
    'currencyconverter' => [
        'class' =>  'egangloff/currencyconverter/components/CurrencyConverter',
    ]
],

```

Migration
---------

[](#migration)

```
./yii migrate --migrationPath=@vendor/egangloff/yii2-currencyconverter/migrations

```

Usage
-----

[](#usage)

### Currency Converter Component

[](#currency-converter-component)

in your controller or view

```
use egangloff\currencyconverter\components\CurrencyConverter;

```

### Currrency Selector Widget

[](#currrency-selector-widget)

Copy and change CSS in frontend/web/css/site.css

```
/* Currency Selector Widget */

.currency{
    text-align: center;
}

#currency-selector{
    margin: 15px;
    background-color: #337AB7;
    color: #fff;
    border: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
}

```

in your view

```
use egangloff\currencyconverter\widgets\CurrencySelector;

```

Update Currencies
-----------------

[](#update-currencies)

In console

```
yii currencyconverter/console/update

```

You can also create a Cron Job for automatic update

```
crontab -e

```

```
0 0 * * * /usr/local/bin/php ~/webapps/toucanproperty/yii currencyconverter/console/update

```

Save and exit, it will automatically update currencies every days at midnight

You can adjust schedule using [crontab.guru](https://crontab.guru/)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8b2a1831fd4ca42e41610eb04749bc5610d7e95e7fabd0e09831990f4cc081f?d=identicon)[egangloff](/maintainers/egangloff)

---

Top Contributors

[![egangloff](https://avatars.githubusercontent.com/u/10196549?v=4)](https://github.com/egangloff "egangloff (12 commits)")

### Embed Badge

![Health badge](/badges/egangloff-yii2-currencyconverter/health.svg)

```
[![Health](https://phpackages.com/badges/egangloff-yii2-currencyconverter/health.svg)](https://phpackages.com/packages/egangloff-yii2-currencyconverter)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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