pandawan-technology/money-bundle

There is no license information available for the latest version (dev-main) of this package.

Integrates moneyphp/money into Symfony' applications

dev-main 2022-07-19 06:52 UTC

This package is auto-updated.

Last update: 2022-08-19 06:56:12 UTC


README

  • PHP 8.0 attributes' support
  • automaticaly add Form type
  • automaticaly add DB types for mapping (doctrine only): amount and currency columns' mappings

Usage

doctrine's mapping:

<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use PandawanTechnology\Money\Model\Money;

#[ORM\Entity]
class Product {
    #[ORM\Embedded(class: Money::class)]
    private $price;
}