Skip to content

Installation

phil/money-bundle

Requirements

RequirementVersionWhy
PHP8.5 or laterThe floor the bundle declares and is tested on
ext-intlanyNumberFormatter, for the locale's separators in forms and for format_money
phil/money^0.1@devMoney and Currency
symfony/form^8.2MoneyType
symfony/validator^8.2AcceptedCurrency and MoneyRange
symfony/intl^8.2The currency data: which codes exist, and their names in a choice
symfony/options-resolver^8.2The options of MoneyType
symfony/config, symfony/dependency-injection^8.2The bundle class is an AbstractBundle

Optional, each registered only when its package is installed:

PackageWhat it adds
twig/twig ^3.21The format_money filter
doctrine/dbal ^4.5The phil_currency column type
doctrine/orm ^3.7The mapping of Money as an embeddable

Installing

The bundle is not published on Packagist yet. Install it and phil/money from the repository that holds them, then:

composer require phil/money-bundle

Register the bundle, if Symfony Flex did not:

// config/bundles.php
return [
    // ...
    Phil\MoneyBundle\PhilMoneyBundle::class => ['all' => true],
];

Then name the currencies the application accepts (configuration.md).