-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Refactor and deprecate Invoice repository class #186
Changes from all commits
2d831bd
c2be2c0
76d3b81
c184a91
a92fa59
8d228e7
702dc40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,11 @@ | ||||||
### UPGRADE FROM 0.11.0 TO 0.11.1 | ||||||
|
||||||
1. The custom repository has been removed : | ||||||
|
||||||
- removed the repository class `DoctrineInvoiceRepository` and replaced by `Sylius\InvoicingPlugin\Doctrine\ORM\InvoiceRepository` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- removed the related service `sylius_invoicing_plugin.custom_repository.invoice` use `sylius_invoicing_plugin.repository.invoice` instead | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- removed the related interface `InvoiceRepository` use `Sylius\InvoicingPlugin\Doctrine\ORM\InvoiceRepositoryInterface` instead | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
### UPGRADE FROM 0.10.X TO 0.11.0 | ||||||
|
||||||
1. Upgrade your application to [Sylius 1.8](https://github.com/Sylius/Sylius/blob/master/UPGRADE-1.8.md). | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Sylius\InvoicingPlugin\Doctrine\ORM; | ||
|
||
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; | ||
use Sylius\InvoicingPlugin\Entity\InvoiceInterface; | ||
|
||
class InvoiceRepository extends EntityRepository implements InvoiceRepositoryInterface | ||
{ | ||
public function findOneByOrderNumber(string $orderNumber): ?InvoiceInterface | ||
{ | ||
/** @var InvoiceInterface|null $invoice */ | ||
$invoice = $this->findOneBy(['orderNumber' => $orderNumber]); | ||
|
||
return $invoice; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Sylius\InvoicingPlugin\Doctrine\ORM; | ||
|
||
use Sylius\Component\Resource\Repository\RepositoryInterface; | ||
use Sylius\InvoicingPlugin\Entity\InvoiceInterface; | ||
|
||
interface InvoiceRepositoryInterface extends RepositoryInterface | ||
{ | ||
public function findOneByOrderNumber(string $orderNumber): ?InvoiceInterface; | ||
} |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.