* 2.0: (64 commits) [Admin] Rename parameter [Admin] Change command handlers and console command ids to dotted notation [Core] Change command handlers and console command ids to dotted notation [Core] Use new services [Core] Rename Message to Command [Admin] Rename Message to Command [Promotion] Remove deprecated commands [Ui] Remove deprecated commands [User] Remove deprecated commands [Admin] Configure and use anonymous view in store component [Admin] Add missing order notes information [Behat] Use test attribute to retrieve order notes [Admin] Render pagination and enabled filter test attributes [Behat] Enable scenarios and improve implementation for filtered pages redirections [Admin] Render view in store button in the variant edit page [CS][DX] Refactor [Behat] Improve view product in store action [Behat] Enable viewing product in store from variant edit page scenarios [Behat] Enable deleting multiple product variants scenario [Behat] Enable remaining managing users scenario ...
12 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 parameters were renamed:
sylius.message.admin_user_create.validation_groupstosylius_admin.command_handler.create_admin_user.validation_groups
-
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 signature of method
applyToCollectionof the following classes has been changed:Sylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\AcceptedProductReviewsExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\AddressesExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\AvailableProductAssociationsInProductCollectionExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\CountryCollectionExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\CurrencyCollectionExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\EnabledProductVariantsExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\HideArchivedShippingMethodExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\LocaleCollectionExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\OrdersByChannelExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\OrdersByLoggedInUserExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\ProductsByChannelAndLocaleCodeExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\ProductsByTaxonExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\ProductsWithEnableFlagExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\ProductsWithEnableFlagExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\RestrictingFilterEagerLoadingExtensionSylius\Bundle\ApiBundle\Doctrine\QueryCollectionExtension\TaxonCollectionExtension
public function applyToCollection(
QueryBuilder $queryBuilder,
QueryNameGeneratorInterface $queryNameGenerator,
string $resourceClass,
- string $operationName = null,
+ \ApiPlatform\Metadata\Operation $operation = null,
array $context = [],
): void;
-
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
-
A new parameter has been added to specify the validation groups for a given zone. If you have any custom validation groups for zone member, you need to add them to your
config/packages/_sylius.yamlfile. This is handled bySylius\Bundle\AddressingBundle\Validator\Constraints\ZoneMemberGroupand it resolves the groups based on the type of the passed zone.sylius_addressing: zone_member: validation_groups: country: - 'sylius' - 'sylius_zone_member_country' zone: - 'sylius' - 'sylius_zone_member_zone'
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.