michaelgooden/mdg-money-doctrine

Doctrine Types and Embeddables for the PHP implementation of Fowler's Money pattern.

0.4.3 2024-10-14 14:54 UTC

This package is auto-updated.

Last update: 2024-11-14 15:11:51 UTC


README

Include the custom Currency type into your Doctrine configuration.

Point a XML mapping driver to the vendor/michaelgooden/mdg-money-doctrine/config/orm/Money.Money.dcm.xml file to being using \Money\Money as an embeddable:

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

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