A Symfony bundle that integrates the Money PHP library for handling monetary values and currency conversions.
TbbcMoneyBundle is a Symfony bundle that integrates the Money PHP library to handle monetary values, currencies, and conversions in web applications. It implements Fowler's Money pattern to provide immutable money objects, avoiding floating-point errors and ensuring type-safe financial calculations. The bundle offers seamless integration with Symfony's form system, Doctrine ORM, and Twig templating.
Symfony developers building applications that require precise handling of monetary values, such as e-commerce platforms, financial tools, or billing systems. It is particularly useful for teams needing robust currency conversion and localized formatting.
Developers choose TbbcMoneyBundle for its deep integration with Symfony's ecosystem, including custom form types, Doctrine support, and Twig filters. It provides a standardized, pattern-based approach to money handling, reducing boilerplate and ensuring accuracy in financial operations.
This bundle is used to integrate the Money library (https://github.com/mathiasverraes/money) into a Symfony project. This library is based on Fowler's Money pattern (https://verraes.net/2011/04/fowler-money-pattern-in-php/)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Integrates the Money PHP library to handle calculations as immutable objects, preventing floating-point errors, as shown in the allocation example where €10 is accurately split into three parts.
Provides custom form types like MoneyType and Twig filters for easy monetary input and display, reducing boilerplate code in Symfony applications.
Supports multiple storage options for conversion ratios (CSV, Doctrine, MongoDB) and allows custom ratio providers, enabling adaptation to various financial data sources.
Uses PHP's NumberFormatter via MoneyFormatter for accurate international currency formatting, with examples for locales like 'fr_FR' and 'en_US' in the README.
Requires manual setup in YAML files for currencies, reference currency, and form themes, which can be error-prone and time-consuming, as detailed in the installation steps.
Advanced functionalities like pair history and some storage options require Doctrine ORM or MongoDB, limiting use in projects without these dependencies.
Heavily depends on the Money PHP library and optional packages like Exchanger, which may introduce compatibility issues or additional maintenance overhead.