PHPackages                             lubo13/money-bridge-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. lubo13/money-bridge-bundle

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

lubo13/money-bridge-bundle
==========================

Symfony Bridge Bundle for moneyphp/money library

v1.0.0(5y ago)2142MITPHPPHP ^7.4

Since Dec 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/lubo13/money-bridge-bundle)[ Packagist](https://packagist.org/packages/lubo13/money-bridge-bundle)[ RSS](/packages/lubo13-money-bridge-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Symfony Bridge Bundle for moneyphp/money library
================================================

[](#symfony-bridge-bundle-for-moneyphpmoney-library)

[v1.0.0](https://github.com/lubo13/money-bridge-bundle/releases)

### The aims of this bridge bundle are:

[](#the-aims-of-this-bridge-bundle-are)

#### Simple Symfony Bridge Bundle for moneyphp/money library useful for integration with [Api Platform](https://api-platform.com/). If you need more complex bundle with Symfony form integration, Twig filters and etc. look at -&gt; tbbc/money-bundle package

[](#simple-symfony-bridge-bundle-for-moneyphpmoney-library-useful-for-integration-with-api-platform-if-you-need-more-complex-bundle-with-symfony-form-integration-twig-filters-and-etc-look-at---tbbcmoney-bundle-package)

1. Compatibility with Doctrine - Money\\Money and Money\\Currency are mapped to be used as [Embeddables classes](https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/tutorials/embeddables.html)
2. Mapped with Symfony Serializer groups - there are 2 groups per class, for input and output. (money:output, money:input, currency:output, currency:input)
3. Mapped with Validator constraint - Moneys' amount property is mapped with NotBlank and with custom Amount constraint (there is the possibility to change behaviour - amount to be only positive or positive\_and\_zero). Currency is mapped with Currency constraint and Currencies' code property is mapped with custom CurrencyCodeChoice constraint (there is the possibility to change allowed Currencies' codes)

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

[](#requirements)

PHP 7.4+; Symfony 4.4+; moneyphp/money 3.3+

Install
-------

[](#install)

Via Composer

```
$ composer require lubo13/money-bridge-bundle
```

Bundle should be auto enabled, just check and if not add it to config/bundles.php

```
Money\Bridge\MoneyBridgeBundle::class => ['all' => true],

```

Usage
-----

[](#usage)

By default, bundles come with preconfigured options that you can change in your favour.

To change some of the preconfigured options create money\_bridge.yaml file in config/packages with the following content:

```
money_bridge:
    integer_part: 12 # How many digits will you have before the dot -> 1234.
    fractional_part: !php/const Money\Bridge\Util\AmountFormatter::MONEY_FRACTIONAL_PART # How many digits will you have after the dot -> .00
    default_currency_code: 'EUR' # With this option you can control default currency (useful with usage of Serializer or [Api Platform](https://api-platform.com/)).
    allowed_currency_code: [ 'EUR' ] # With this option you can control allowed currency when the Currency is validated.
    amount_validation_rule: positive # There are two option positive or positive_or_zero. With this option, you can control input data on Deserialization process. (useful with usage of Serializer or [Api Platform](https://api-platform.com/))
```

#### To use Money and Currency library as embeddables classes:

[](#to-use-money-and-currency-library-as-embeddables-classes)

```
/**
* @ORM\Embedded(class="Money\Money")
*/
private Money $price;

```

or

```
/**
* @ORM\Embedded(class="Money\Money")
*/
private $price;

```

Also if you write your migration manual you need to add the two new columns to your table:

```
$this->addSql('ALTER TABLE YOUR_TABLE_NAME ADD price_amount BIGINT DEFAULT NULL');
$this->addSql('ALTER TABLE YOUR_TABLE_NAME ADD price_currency_code VARCHAR(3) NULL');
```

#### To allow property of Money and Currency to be serialized and deserialized properly in your favour you can use the following groups:

[](#to-allow-property-of-money-and-currency-to-be-serialized-and-deserialized-properly-in-your-favour-you-can-use-the-following-groups)

```
For deserialize:

    money:input -> Moneys' amount property

    currency:input -> for Currencies' code property

For serialize:

    money:output -> Moneys' amount property

    currency:output -> for Currencies' code property

```

#### Format price amount somewhere in your app to be compatible with Money library:

[](#format-price-amount-somewhere-in-your-app-to-be-compatible-with-money-library)

```
\Money\Bridge\Util\AmountFormatter::getAmountWithoutFractional('100.99', 2);

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

1963d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47d79f86084d12134bdad7dd9e8ff40ff388509c95bcef1faaada3cb51414ebc?d=identicon)[lubo13](/maintainers/lubo13)

---

Top Contributors

[![lubo13](https://avatars.githubusercontent.com/u/10156301?v=4)](https://github.com/lubo13 "lubo13 (1 commits)")

---

Tags

phpsymfonymoneymoneyphp

### Embed Badge

![Health badge](/badges/lubo13-money-bridge-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/lubo13-money-bridge-bundle/health.svg)](https://phpackages.com/packages/lubo13-money-bridge-bundle)
```

###  Alternatives

[kucharovic/money-bundle

This bundle provides integration for Money library in your Symfony project.

2253.7k](/packages/kucharovic-money-bundle)[headsnet/money-bundle

Integrates moneyphp/money into your Symfony application

1116.2k](/packages/headsnet-money-bundle)[llm-agents/agents

LLM Agents PHP SDK - Autonomous Language Model Agents for PHP

16410.9k9](/packages/llm-agents-agents)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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