Sylius / InvoicingPlugin

Generate an Invoice for every placed order
MIT License
79 stars 83 forks source link

Typing problem on LineItem entity #206

Open jorisduenas opened 3 years ago

jorisduenas commented 3 years ago

Hi,

I noticed a problem on LineItem objects. In the class we find getId() and id() which return a string like this:

LineItem.php#L62

public function getId(): string
{
    return $this->id();
}

public function id(): string
{
    return $this->id;
}

However, this id is configured as integer in the orm:

LineItem.orm.xml#L5

<id name="id" column="id" type="integer">
    <generator strategy="AUTO" />
</id>

This creates typing errors.

diimpp commented 3 years ago

And it should be nullable as well.