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.
Because the serialization of quantity values involves complex objects (
DecimalValue
instances), thegetSerializationForHash()
implementation we inherit fromDataValueObject
isn’t good enough: we need to override it to also callgetSerializationForHash()
on the innerDecimalValue
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