- Support for Sylius 1.13 has been added, it is now the recommended Sylius version to use with InvoicingPlugin.
- Support for Sylius 1.11 has been dropped, upgrade your application to Sylius 1.12. or to Sylius 1.13.
- Support for PHP 8.0 has been dropped.
- Support for Sylius 1.12 has been added, it is now the recommended Sylius version to use with InvoicingPlugin.
- Support for Sylius 1.10 has been dropped, upgrade your application to Sylius 1.11. or to Sylius 1.12.
- Support for Symfony 6 has been added.
- Support for Symfony 4.4 has been dropped.
Sylius\InvoicingPlugin\Generator\InvoicePdfFileGenerator
takesSylius\InvoicingPlugin\Generator\TwigToPdfGeneratorInterface
as the first argument in place ofTwig\Environment
,Knp\Snappy\GeneratorInterface
andSylius\InvoicingPlugin\Generator\PdfOptionsGeneratorInterface
.Sylius\InvoicingPlugin\Creator\InvoiceCreator
takes%sylius_invoicing.pdf_generator.enabled%
as the sixth argument.Sylius\InvoicingPlugin\Ui\Action\DownloadInvoiceAction
takes%sylius_invoicing.pdf_generator.enabled%
as the fourth argument.Sylius\InvoicingPlugin\Email\InvoiceEmailSender
takes%sylius_invoicing.pdf_generator.enabled%
as the third argument.
Sylius\InvoicingPlugin\Generator\InvoicePdfFileGenerator
takesSylius\InvoicingPlugin\Generator\PdfOptionsGeneratorInterface
as the third argument afterKnp\Snappy\GeneratorInterface
.
- Since 0.20.0, the recommended Sylius version to use with InvoicingPlugin is
1.11.*
. If you would like to upgrade Sylius to v1.11.0, please follow Sylius's upgrade instructions and Sylius API's upgrade instructions.
- Support for Sylius 1.9 has been dropped, upgrade your application to Sylius 1.10.
- Support for Symfony 5.2 and 5.3 has been dropped.
- Default channel color feature was removed in favour of
sylius/sylius
standard solution. Overridesrc/Sylius/Bundle/AdminBundle/Resources/views/Common/_channel.html.twig
if custom default color is neccesasary.- Class
Sylius\InvoicingPlugin\Provider\ChannelColorProvider
was removed. - Interface
Sylius\InvoicingPlugin\Provider\ChannelColorProviderInterface
was removed. - Class
Sylius\InvoicingPlugin\Twig\ChannelColorExtension
and twig filtersylius_channel_color
were removed. - Parameter
default_channel_color
was removed
- Class
- The
Sylius\InvoicingPlugin\Converter\BillingDataConverter
has been removed in favor ofSylius\InvoicingPlugin\Factory\BillingDataFactory->createFromAddress
. - The
Sylius\InvoicingPlugin\Converter\InvoiceShopBillingDataConverter
has been removed in favor ofSylius\InvoicingPlugin\Factory\InvoiceShopBillingDataFactory->createFromChannel
.
Now on invoice admin and shop user can check if related order was paid before invoice generated.
-
src/Entity/Invoice.php
model has new field (paymentState
), and updated constructor arguments:public function __construct( string $id, string $number, OrderInterface $order, \DateTimeInterface $issuedAt, BillingDataInterface $billingData, string $currencyCode, string $localeCode, int $total, Collection $lineItems, Collection $taxItems, ChannelInterface $channel, + string $paymentState, InvoiceShopBillingDataInterface $shopBillingData ) { $this->id = $id; $this->number = $number; $this->order = $order; $this->issuedAt = clone $issuedAt; $this->billingData = $billingData; $this->currencyCode = $currencyCode; $this->localeCode = $localeCode; $this->total = $total; $this->lineItems = $lineItems; $this->taxItems = $taxItems; $this->channel = $channel; + $this->paymentState = $paymentState; $this->shopBillingData = $shopBillingData;
-
New field on
src/Entity/Invoice.php
implies a database update -
Method
createForData
fromsrc/Factory/InvoiceFactory.php
service was updated:public function createForData( string $id, string $number, OrderInterface $order, \DateTimeInterface $issuedAt, BillingDataInterface $billingData, string $currencyCode, string $localeCode, int $total, Collection $lineItems, Collection $taxItems, ChannelInterface $channel, + string $paymentState, InvoiceShopBillingDataInterface $shopBillingData = null ): InvoiceInterface { // ... }
Invoices are now saved on the server during their generation (by default, when the order is paid).
Sylius\InvoicingPlugin\Creator\InvoiceCreator
class has 2 more dependencies:InvoicePdfFileGeneratorInterface $invoicePdfFileGenerator
andInvoiceFileManagerInterface $invoiceFileManager
Sylius\InvoicingPlugin\Email\InvoiceEmailSender
class 2nd dependency has been changed fromInvoicePdfFileGeneratorInterface $invoicePdfFileGenerator
toInvoiceFileProviderInterface $invoiceFileProvider
Sylius\InvoicingPlugin\Generator\InvoicePdfFileGenerator
class has additionalInvoiceFileNameGeneratorInterface $invoiceFileNameGenerator
dependency, placed on 4th place, beforestring $template
Sylius\InvoicingPlugin\Ui\Action\DownloadInvoiceAction
class 4th dependency has been changed fromInvoicePdfFileGeneratorInterface $invoicePdfFileGenerator
toInvoiceFileProviderInterface $invoiceFilePathProvider
Sylius\InvoicingPlugin\Converter\LineItemsConverter
class has additionalTaxRatePercentageProviderInterface $taxRatePercentageProvider
dependencySylius\InvoicingPlugin\Provider\TaxRateProvider
service has been changed toSylius\InvoicingPlugin\Provider\TaxRatePercentageProvider
and its service definition fromsylius_invoicing_plugin.provider.tax_rate
tosylius_invoicing_plugin.provider.tax_rate_percentage
Sylius\InvoicingPlugin\Converter\LineItemsConverter
service has been replaced bySylius\InvoicingPlugin\Converter\OrderItemUnitsToLineItemsConverter
andSylius\InvoicingPlugin\Converter\ShippingAdjustmentsToLineItemsConverter
Sylius\InvoicingPlugin\Generator\InvoiceGenerator
class has 2 more dependencies:LineItemsConverterInterface $orderItemUnitsToLineItemsConverter
andLineItemsConverterInterface $shippingAdjustmentsToLineItemsConverter
that replacedLineItemsConverterInterface $lineItemsConverter
- The return type of
Sylius\InvoicingPlugin\Converter\LineItemsConverterInterface:convert
method has been changed fromCollection
toarray
Sylius\InvoicingPlugin\Filesystem\TemporaryFilesystem
class has been removed
orderNumber
field onSylius\InvoicingPlugin\Entity\Invoice
has been removed and replaced with relation toOrder
entity.Sylius\InvoicingPlugin\Entity\InvoiceInterface::orderNumber
function is left due to easier and smoother upgrades, but is also deprecated and will be removed in thev1.0.0
release. UseSylius\InvoicingPlugin\Entity\InvoiceInterface::order
instead.Sylius\InvoicingPlugin\Doctrine\ORM\InvoiceRepositoryInterface::findOneByOrderNumber
method has been replaced bySylius\InvoicingPlugin\Doctrine\ORM\InvoiceRepositoryInterface::findOneByOrder
.Sylius\InvoicingPlugin\Factory\InvoiceFactoryInterface::createForData
takesOrderInterface $order
as the 3rd argument instead ofstring $orderNumber
.
-
Command bus
sylius_invoicing_plugin.command_bus
has been replaced withsylius.command_bus
. -
Event bus
sylius_invoicing_plugin.event_bus
has been replaced withsylius.event_bus
. -
Support for Sylius 1.8 has been dropped, upgrade your application to Sylius 1.9 or Sylius 1.10.
- The custom repository has been removed:
- the repository class
Sylius\InvoicingPlugin\Repository\DoctrineInvoiceRepository
has been removed and replaced bySylius\InvoicingPlugin\Doctrine\ORM\InvoiceRepository
. - the related service
sylius_invoicing_plugin.custom_repository.invoice
has been removed, usesylius_invoicing_plugin.repository.invoice
instead - the related interface
Sylius\InvoicingPlugin\Repository\InvoiceRepository
has been removed, useSylius\InvoicingPlugin\Doctrine\ORM\InvoiceRepositoryInterface
instead.
- the repository class
-
Upgrade your application to Sylius 1.8.
-
Remove previously copied migration files (You may check migrations to remove here).
-
Removed
InvoicingChannel
and replaced bySylius\Component\Core\Model\ChannelInterface
. -
Replaced
InvoiceShopBillingData
value object by entity withInvoiceShopBillingDataInterface
interface.