Skip to content

Commit

Permalink
[LineItem] Revert changing return type of invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed Sep 16, 2021
1 parent 95e2a09 commit ca9d93e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
### UPGRADE FROM 0.18.0 TO 0.19.0

1. The return type of `Sylius\InvoicingPlugin\Entity\LineItemInterface:invoice` method has been changed
from `InvoiceInterface` to `?InvoiceInterface`

### UPGRADE FROM 0.17.0 TO 0.18.0

1. The `Sylius\InvoicingPlugin\Converter\BillingDataConverter` has been removed in favor of `Sylius\InvoicingPlugin\Factory\BillingDataFactory->createFromAddress`.
Expand Down
4 changes: 2 additions & 2 deletions src/Entity/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class LineItem implements LineItemInterface, ResourceInterface
/** @var mixed */
protected $id;

protected ?InvoiceInterface $invoice = null;
protected InvoiceInterface $invoice;

protected string $name;

Expand Down Expand Up @@ -74,7 +74,7 @@ public function id()
return $this->id;
}

public function invoice(): ?InvoiceInterface
public function invoice(): InvoiceInterface
{
return $this->invoice;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/LineItemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface LineItemInterface
{
public function id();

public function invoice(): ?InvoiceInterface;
public function invoice(): InvoiceInterface;

public function setInvoice(InvoiceInterface $invoice): void;

Expand Down

0 comments on commit ca9d93e

Please sign in to comment.