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

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

grynchuk/currency
=================

Get currency rates and perform currency conversion

v1.0.8(2y ago)034MITPHPPHP ^8.3

Since Sep 23Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (10)Used By (0)

Currency
========

[](#currency)

Provide the minimum functionality to get rate and perform currency amount conversion (using php math).

Install
-------

[](#install)

To install run:

```
composer require grynchuk/currency
```

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

[](#configuration)

You may provide a configuration with available currencies that are used to get rates. Do do this you will need to add yaml config and pass it to `Currency\DataProvider\CurrencyConfigDataProvider`. This yaml config should looks like this:

```
currency:
  items:
    - { code: !php/enum Currency\Enum\Code::USD, precision: 2, description: 'United States Dollar'}
```

By default this configuration contain only three currency `USD` `EUR` `PLN`.

As for now no bridge to Symfony is provided (may be I`ll implement it later), so you need to do it by your self, to get more details see tests. Basic Symfony DI config (`symfony/dependency-injection`) to get rates from Monobank looks like this:

```
services:
  app.currency.remote.service:
    class: Currency\Service\CurrencyService
    arguments:
      - '@app.currency.repository'
      - '@app.currency.rate.repository'

  app.currency.rate.repository:
    class: Currency\Repository\EntityRepository
    arguments:
      - '@app.currency.rate.provider'

  app.currency.rate.provider:
    class: Currency\DataProvider\Rate\MonobankRateDataProvider
    arguments:
      - '@app.currency.rate.client.monobank'
      - !php/enum Currency\Enum\Code::UAH
      - '@app.currency.rate.dta_mapper.monobank'

  app.currency.rate.dta_mapper.monobank:
    class: Currency\Mapper\Rate\RateDataMapper

  app.currency.rate.client.monobank:
    class: Monobank\MonobankClient
    arguments:
      - '@app.currency.rate.client.guzzle'
      - '@app.currency.rate.client.monobank.empty_token'

  app.currency.rate.client.monobank.empty_token:
    class: Monobank\ValueObject\Token
    arguments:
      - 'empty_token'

  app.currency.rate.client.guzzle:
    class: GuzzleHttp\Client

  app.currency.repository:
    class: Currency\Repository\EntityRepository
    arguments:
      - '@app.currency.data_provider'

  app.currency.data_provider:
    class: Currency\DataProvider\CurrencyConfigDataProvider
    arguments:
      - '@app.currency.config.processor'
      - '@app.currency.config.definition'
      - '@app.currency.mapper'

  app.currency.config.processor:
    class: Symfony\Component\Config\Definition\Processor

  app.currency.config.definition:
    class: Currency\Configuration\CurrencyConfiguration

  app.currency.mapper:
    class: Currency\Mapper\CurrencyMapper
```

How to use
----------

[](#how-to-use)

To use core functional you need to init one of the service form `Currency\Service` namespace and then use it according to provided interface.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~24 days

Recently: every ~3 days

Total

9

Last Release

769d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.4PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b1c0a62d90bd30da1f0df75822f881e36b68c2e9dd4219772a3dae42095ed43?d=identicon)[grynchuk](/maintainers/grynchuk)

---

Top Contributors

[![grynchuk](https://avatars.githubusercontent.com/u/19249987?v=4)](https://github.com/grynchuk "grynchuk (9 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[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)[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)[sineflow/clamav

ClamAV PHP Client for Symfony

10168.5k](/packages/sineflow-clamav)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)

PHPackages © 2026

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