wmde / Number

Numerical value objects, parsers and formatters
Other
18 stars 6 forks source link

Fix hashes after serialization change #142

Closed lucaswerkmeister closed 2 years ago

lucaswerkmeister commented 2 years ago

Because the serialization of quantity values involves complex objects (DecimalValue instances), the getSerializationForHash() implementation we inherit from DataValueObject isn’t good enough: we need to override it to also call getSerializationForHash() on the inner DecimalValue instances (amount, upper bound, lower bound).

The hashes for the tests were obtained inside a php:7.2 Docker container, after installing the specified versions with composer, inside a php -a shell.

Bug: T301249