Integration between moneyphp/money and Doctrine ORM.
Via Composer
$ composer require moneyphp/money-doctrine
This package provides XML, YAML and Fluent implementations, feel free to use the one that suits your project.
// XML
$configuration = Setup::createXMLMetadataConfiguration([
// your mappings...
'/path/to/vendor/moneyphp/doctrine-money/src/xml',
]);
// YAML
$configuration = Setup::createYAMLMetadataConfiguration([
// your mappings...
'/path/to/vendor/moneyphp/doctrine-money/src/yaml',
]);
// Fluent
$fluent = new FluentDriver([
// your mappings...
Money\Doctrine\Fluent\MoneyMapping::class,
Money\Doctrine\Fluent\CurrencyMapping::class,
]);