In PurchasedEntityAvailableConstraintValidator::validate(), the first line makes the following assertion:
assert($value instanceof EntityReferenceFieldItemListInterface);
This works when the validation is done when attached to the purchasable entity field, which is a entity reference field.
In some scenarios, the validation is placed on the Quantity field, though, which causes the assertion to fail, even though the code still completes successfully. This also causes a Warning.
This is a simple change to make the assertion check for FieldItemListInterface instead.
Comments
Comment #2
tomtech commentedComment #3
tomtech commentedComment #5
tomtech commentedComment #7
jsacksick commentedCommitted, thanks!