9.4 KiB
UPGRADE FROM 1.13 TO 2.0
-
Non-prefix serialization groups in Sylius resources have been removed. If you have extended any of them, you must prefix them with
sylius:, for example:- #[Groups(['admin:product:index'])] + #[Groups(['sylius:admin:product:index'])]
Codebase
-
Doctrine MongoDB and PHPCR is not longer supported in ResourceBundle and GridBundle:
-
The following classes were removed:
Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\DataSourceSylius\Bundle\GridBundle\Doctrine\PHPCRODM\DriverSylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionBuilderSylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionBuilderInterfaceSylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionVisitorSylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExtraComparisonSylius\Bundle\ResourceBundle\DependencyInjection\Driver\Doctrine\DoctrineODMDriverSylius\Bundle\ResourceBundle\DependencyInjection\Driver\Doctrine\DoctrinePHPCRDriverSylius\Bundle\ResourceBundle\Doctrine\ODM\MongoDB\DocumentRepositorySylius\Bundle\ResourceBundle\Doctrine\ODM\MongoDB\TranslatableRepositorySylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\DefaultParentListenerSylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\NameFilterListenerSylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\NameResolverListenerSylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\Form\Builder\DefaultFormBuilderSylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\DocumentRepositorySylius\Bundle\ResourceBundle\EventListener\ODMMappedSuperClassSubscriberSylius\Bundle\ResourceBundle\EventListener\ODMRepositoryClassSubscriberSylius\Bundle\ResourceBundle\EventListener\ODMTranslatableListener
-
The following services were removed:
sylius.event_subscriber.odm_mapped_super_classsylius.event_subscriber.odm_repository_classsylius.grid_driver.doctrine.phpcrodm
-
The following parameters were removed:
sylius.mongodb_odm.repository.classsylius.phpcr_odm.repository.class
-
The following configuration options were removed:
sylius.mailer.templates
-
-
Added the
Sylius\Component\Order\Context\ResettableCartContextInterfacethat extendsSylius\Component\Order\Context\CartContextInterfaceandSymfony\Contracts\Service\ResetInterface. -
The name of the default
LiipImagineBundle's resolver and loader were changed from default to **sylius_image ** (reference). To change the default resolver and/or loader forLiipImagineBundle, configurecacheand/ordata_loaderparameters under theliip_imaginekey. -
The
sylius/calendarpackage has been replaced withsymfony/clockpackage. All usages of theSylius\Calendar\Provider\DateTimeProviderInterfaceclass have been replaced withSymfony\Component\Clock\ClockInterfaceclass.-
The following classes were changed:
Sylius\Bundle\CoreBundle\CatalogPromotion\Announcer\CatalogPromotionAnnouncerSylius\Bundle\CoreBundle\MessageHandler\Admin\Account\RequestResetPasswordEmailHandlerSylius\Bundle\CoreBundle\PriceHistory\Logger\PriceChangeLoggerSylius\Bundle\CoreBundle\PriceHistory\Remover\ChannelPricingLogEntriesRemoverSylius\Bundle\ShippingBundle\Assigner\ShippingDateAssignerSylius\Bundle\PromotionBundle\Criteria\DateRangeSylius\Bundle\ApiBundle\Applicator\ArchivingShippingMethodApplicatorSylius\Bundle\ApiBundle\CommandHandler\Account\RequestResetPasswordTokenHandlerSylius\Bundle\ApiBundle\CommandHandler\Account\VerifyCustomerAccountHandlerSylius\Component\Taxation\Checker\TaxRateDateEligibilityChecker
-
-
The parameter order of
Sylius\Bundle\CoreBundle\Form\Type\Checkout\AddressType::__constructhas been changed:
public function __construct(
+ private readonly AddressComparatorInterface $addressComparator,
string $dataClass,
array $validationGroups = []
- private readonly AddressComparatorInterface $addressComparator = null,
)
-
The
\Serializableinterface has been removed from theSylius\Component\User\Model\UserInterface. -
The parameter order of the
Sylius\Component\Core\OrderProcessing\OrderPaymentProcessor::__constructhas been changed:
public function __construct(
private OrderPaymentProviderInterface $orderPaymentProvider,
- private string $targetState = PaymentInterface::STATE_CART,
private OrderPaymentsRemoverInterface $orderPaymentsRemover,
private array $unprocessableOrderStates,
+ private string $targetState = PaymentInterface::STATE_CART,
)
-
The
swiftmailer/swiftmailerdependency has been removed. Usesymfony/mailerinstead. -
The following repository classes and interfaces were added, if you have custom repositories, you need to update them to extend the new ones:
Addressing:
Sylius\Bundle\AddressingBundle\Doctrine\ORM\AddressRepositoryextendsSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositoryimplementsSylius\Component\Addressing\Repository\AddressRepositoryInterfaceSylius\Bundle\AddressingBundle\Doctrine\ORM\CountryRepositoryextendsSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositoryimplementsSylius\Component\Addressing\Repository\CountryRepositoryInterfaceSylius\Bundle\AddressingBundle\Doctrine\ORM\ProvinceRepositoryextendsSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositoryimplementsSylius\Component\Addressing\Repository\ProvinceRepositoryInterfaceSylius\Bundle\AddressingBundle\Doctrine\ORM\ZoneMemberRepositoryextendsSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositoryimplementsSylius\Component\Addressing\Repository\ZoneMemberRepositoryInterface
Attribute:
Sylius\Bundle\AttributeBundle\Doctrine\ORM\AttributeRepositoryextendsSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositoryimplementsSylius\Component\Attribute\Repository\AttributeRepositoryInterfaceSylius\Bundle\AttributeBundle\Doctrine\ORM\AttributeTranslationRepositoryextendsSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositoryimplementsSylius\Component\Attribute\Repository\AttributeTranslationRepositoryInterfaceSylius\Bundle\AttributeBundle\Doctrine\ORM\AttributeValueRepositoryextendsSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositoryimplementsSylius\Component\Attribute\Repository\AttributeValueRepositoryInterface
Product:
Sylius\Bundle\ProductBundle\Doctrine\ORM\ProductAssociationRepositorySylius\Bundle\ProductBundle\Doctrine\ORM\ProductAssociationTypeTranslationRepositorySylius\Bundle\ProductBundle\Doctrine\ORM\ProductAttributeRepositorySylius\Bundle\ProductBundle\Doctrine\ORM\ProductAttributeTranslationRepositorySylius\Bundle\ProductBundle\Doctrine\ORM\ProductOptionTranslationRepositorySylius\Bundle\ProductBundle\Doctrine\ORM\ProductOptionValueRepositorySylius\Bundle\ProductBundle\Doctrine\ORM\ProductOptionValueTranslationRepositorySylius\Bundle\ProductBundle\Doctrine\ORM\ProductTranslationRepositorySylius\Bundle\ProductBundle\Doctrine\ORM\ProductVariantTranslationRepository
Currency:
Sylius\Bundle\CurrencyBundle\Doctrine\ORM\CurrencyRepositoryextendsSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositoryimplementsSylius\Component\Currency\Repository\CurrencyRepositoryInterface
-
The following repository classes and interfaces namespaces were changed, if you have custom repositories, you need to update them to extend the new ones:
Addressing:
Sylius\Bundle\CoreBundle\Doctrine\ORM\AddressRepositoryextended class changed fromSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositorytoSylius\Bundle\AddressingBundle\Doctrine\ORM\AddressRepositorySylius\Component\Core\Repository\AddressRepositoryInterfaceimplemented interface changed fromSylius\Component\Resource\Repository\RepositoryInterfacetoSylius\Component\Addressing\Repository\AddressRepositoryInterface
Attribute:
Sylius\Bundle\CoreBundle\Doctrine\ORM\AttributeRepositoryextended class changed fromSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositorytoSylius\Bundle\AttributeBundle\Doctrine\ORM\AttributeRepositorySylius\Component\Product\Repository\ProductAttributeValueRepositoryInterfaceextended interface changed fromSylius\Component\Resource\Repository\RepositoryInterfacetoSylius\Component\Attribute\Repository\AttributeValueRepositoryInterface
Product:
Sylius\Bundle\CoreBundle\Doctrine\ORM\ProductAssociationRepositoryextended class changed fromSylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepositorytoSylius\Bundle\ProductBundle\Doctrine\ORM\ProductAssociationRepository
Frontend
use_webpackoption was removed from thesylius_uiconfiguration, and the Webpack has become the only module bundler provided by Sylius.use_webpacktwig global variable was removed. Webpack is always used now, and there is no need to check for it.