Sylius / RefundPlugin

Basic refunds functionality for Sylius
MIT License
63 stars 68 forks source link

[Bug] LineItem is instantiated without a factory #416

Open lruozzi9 opened 12 months ago

lruozzi9 commented 12 months ago

SyliusRefundPlugin version affected: 1.4.0

Description
In https://github.com/Sylius/RefundPlugin/blob/66c42d382cf7bfbfa9d636dce83612ae18dd1b2e/src/Converter/LineItem/OrderItemUnitLineItemsConverter.php#L70 the LineItem entity is created statically without a factory class

Steps to reproduce
Add an extension of the LineItem class. When you class entityManager->flush(); it will fail because it is expected to be an instance of LineItem extension.

Possible Solution
Use a factory class.