marekskopal / orm-decimal
Decimal type from ext-decimal PHP extension mapper for MarekSkopal ORM.
v1.0.0
2024-12-31 11:09 UTC
Requires
- php: >=8.4
- ext-decimal: *
- marekskopal/orm: ^0.9.0
- php-decimal/php-decimal: ^1.1.0
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^11.4
- slevomat/coding-standard: ^8.15
README
Decimal type from ext-decimal PHP extension mapper for MarekSkopal ORM.
Install
composer require marekskopal/orm-decimal
Usage
Add ColumnDecimal
attribute to your entity parameter.
use Decimal\Decimal; use MarekSkopal\ORM\Attribute\Entity; use MarekSkopal\ORM\Decimal\Attribute\ColumnDecimal; #[Entity] class MyEntity { #[ColumnDecimal(precision: 8, scale: 2)] public Decimal $value; }