-
The minimum supported Symfony version has been raised to
6.4and7.4— earlier 7.x releases (7.1,7.2,7.3) are no longer supported. -
Support for the
SyliusPdfGenerationBundlehas been added as an alternative to the legacy PDF generation which was usingKnpSnappyBundlewith a hardcodedwkhtmltopdfbinary. To use it, set thelegacyoption tofalsein your configuration:sylius_refund: pdf_generator: legacy: false
The bundle is preconfigured with
knp_snappyadapter andgaufrettestorage by default, with asylius_refundcontext making it a drop-in replacement.The
sylius_refund.pdf_generator.legacyoption itself is deprecated and will be removed in 3.0, together with the entire legacy PDF generation path. TheSyliusPdfGenerationBundleintegration will become the only supported mode. -
The following services now accept new argument types from the
SyliusPdfGenerationBundle. Passing the old types is deprecated and will be removed in 3.0:-
Sylius\RefundPlugin\Generator\CreditMemoPdfFileGenerator:public function __construct( private RepositoryInterface $creditMemoRepository, private FileLocatorInterface $fileLocator, private string $template, private string $creditMemoLogoPath, - private TwigToPdfGeneratorInterface $twigToPdfGenerator, + private TwigToPdfGeneratorInterface|TwigToPdfRendererInterface $twigToPdfRenderer, private CreditMemoFileNameGeneratorInterface $creditMemoFileNameGenerator, ) -
Sylius\RefundPlugin\Resolver\CreditMemoFileResolver:public function __construct( private CreditMemoRepositoryInterface $creditMemoRepository, private CreditMemoFileProviderInterface $creditMemoFileProvider, private CreditMemoPdfFileGeneratorInterface $creditMemoPdfFileGenerator, - private CreditMemoFileManagerInterface $creditMemoFileManager, + private CreditMemoFileManagerInterface|PdfFileManagerInterface $creditMemoFileManager, + private ?CreditMemoFileNameGeneratorInterface $creditMemoFileNameGenerator = null, ) -
Sylius\RefundPlugin\Resolver\CreditMemoFilePathResolver:public function __construct( - private string $creditMemosPath, + private string|PdfFileManagerInterface $creditMemosPath, )
-
-
The following classes, interfaces, and services have been deprecated and will be removed in 3.0:
Deprecated Replacement Sylius\RefundPlugin\Generator\TwigToPdfGeneratorInterfaceSylius\PdfGenerationBundle\Core\Renderer\TwigToPdfRendererInterfaceSylius\RefundPlugin\Generator\TwigToPdfGeneratorSylius\PdfGenerationBundle\Core\Renderer\TwigToPdfRendererInterfaceSylius\RefundPlugin\Generator\PdfOptionsGeneratorInterfacesylius/pdf-generation-bundleoption processorsSylius\RefundPlugin\Generator\PdfOptionsGeneratorsylius/pdf-generation-bundleoption processorsSylius\RefundPlugin\Manager\CreditMemoFileManagerInterfaceSylius\PdfGenerationBundle\Core\Filesystem\Manager\PdfFileManagerInterfaceSylius\RefundPlugin\Manager\CreditMemoFileManagerSylius\PdfGenerationBundle\Core\Filesystem\Manager\PdfFileManagerThe corresponding services (
sylius_refund.generator.twig_to_pdf,sylius_refund.generator.pdf_options, andsylius_refund.manager.credit_memo_file) are also deprecated.