andydefer / php-vo
A collection of reusable Value Objects and Enums for PHP applications (Email, Money, Address, PostalCode, Iso8601DateTime, Currency, etc.)
0.7.0
2026-06-07 12:59 UTC
Requires
- php: >=8.1
- andydefer/domain-structures: ^1.3
- c3t4r4/openlocationcode: ^1.1
Requires (Dev)
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.0|^10.0
- phpunit/phpunit: ^10.5|^11.0|^12.0
README
Une collection de Value Objects et Enums réutilisables pour applications PHP 8.1+.
Installation
composer require andydefer/php-vo
Prérequis
- PHP 8.1 ou supérieur
andydefer/domain-structures^1.3
Documentation
Exemple rapide
use AndyDefer\PhpVo\ValueObjects\MoneyVO; use AndyDefer\PhpVo\ValueObjects\AmountVO; use AndyDefer\PhpVo\Enums\Currency; $money = new MoneyVO(AmountVO::from('99.99'), Currency::EUR); echo $money->format(); // '99.99 €'
License
MIT © Andy Defer