mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Refine Upgrade Files content (#17499)
| Q | A |-----------------|----- | Branch? | 2.0 <!-- see the comment below --> | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no <!-- don't forget to update the UPGRADE-*.md file --> | License | MIT <!-- - Bug fixes must be submitted against the 1.13 branch - Features and deprecations must be submitted against the 1.14 branch - Features, removing deprecations and BC breaks must be submitted against the 2.0 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html -->
This commit is contained in:
commit
7073ae597d
2 changed files with 59 additions and 43 deletions
|
|
@ -403,7 +403,8 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\AdminBundle\Action\ResendOrderConfirmationEmailAction`
|
||||
```diff
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
|
||||
public function __construct(
|
||||
private OrderRepositoryInterface $orderRepository,
|
||||
- private OrderEmailManagerInterface|ResendOrderConfirmationEmailDispatcherInterface $orderEmailManager,
|
||||
|
|
@ -418,8 +419,8 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\AdminBundle\Action\ResendShipmentConfirmationEmailAction`
|
||||
```diff
|
||||
use Sylius\Bundle\AdminBundle\EmailManager\ShipmentEmailManagerInterface;
|
||||
use Sylius\Bundle\CoreBundle\MessageDispatcher\ResendShipmentConfirmationEmailDispatcherInterface;
|
||||
use Sylius\Bundle\AdminBundle\EmailManager\ShipmentEmailManagerInterface;
|
||||
use Sylius\Bundle\CoreBundle\MessageDispatcher\ResendShipmentConfirmationEmailDispatcherInterface;
|
||||
|
||||
public function __construct(
|
||||
private ShipmentRepositoryInterface $shipmentRepository,
|
||||
|
|
@ -433,7 +434,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\AdminBundle\Controller\ImpersonateUserController`
|
||||
```diff
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
|
||||
public function __construct(
|
||||
private UserImpersonatorInterface $impersonator,
|
||||
|
|
@ -447,7 +448,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\AdminBundle\EventListener\ShipmentShipListener`
|
||||
```diff
|
||||
use Sylius\Bundle\CoreBundle\Mailer\ShipmentEmailManagerInterface;
|
||||
use Sylius\Bundle\CoreBundle\Mailer\ShipmentEmailManagerInterface;
|
||||
|
||||
public function __construct(
|
||||
- private DeprecatedShipmentEmailManagerInterface|ShipmentEmailManagerInterface $shipmentEmailManager
|
||||
|
|
@ -457,7 +458,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\Configuration\SelectAttributeChoicesCollectionType`
|
||||
```diff
|
||||
use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface;
|
||||
use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface;
|
||||
|
||||
public function __construct(
|
||||
- ?TranslationLocaleProviderInterface $localeProvider = null,
|
||||
|
|
@ -466,8 +467,8 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionRemovalProcessor`
|
||||
```diff
|
||||
use Sylius\Bundle\CoreBundle\CatalogPromotion\Announcer\CatalogPromotionRemovalAnnouncerInterface;
|
||||
use Symfony\Component\Messenger\MessageBusInterface;
|
||||
use Sylius\Bundle\CoreBundle\CatalogPromotion\Announcer\CatalogPromotionRemovalAnnouncerInterface;
|
||||
use Symfony\Component\Messenger\MessageBusInterface;
|
||||
|
||||
public function __construct(
|
||||
private CatalogPromotionRepositoryInterface $catalogPromotionRepository,
|
||||
|
|
@ -479,7 +480,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\CoreBundle\Fixture\Factory\ProductExampleFactory`
|
||||
```diff
|
||||
use Symfony\Component\Config\FileLocatorInterface;
|
||||
use Symfony\Component\Config\FileLocatorInterface;
|
||||
|
||||
public function __construct(
|
||||
private FactoryInterface $productFactory,
|
||||
|
|
@ -513,7 +514,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\CoreBundle\Fixture\Factory\PromotionExampleFactory`
|
||||
```diff
|
||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
||||
|
||||
public function __construct(
|
||||
private FactoryInterface $promotionFactory,
|
||||
|
|
@ -529,8 +530,8 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\CoreBundle\Installer\Provider\DatabaseSetupCommandsProvider`
|
||||
```diff
|
||||
use Doctrine\Bundle\DoctrineBundle\Registry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\Bundle\DoctrineBundle\Registry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
public function __construct(
|
||||
- Registry $doctrineRegistry,
|
||||
|
|
@ -540,7 +541,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\CoreBundle\Installer\Setup\LocaleSetup`
|
||||
```diff
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
|
||||
public function __construct(
|
||||
private RepositoryInterface $localeRepository,
|
||||
|
|
@ -555,7 +556,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntityValidator`
|
||||
```diff
|
||||
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
||||
|
||||
public function __construct(
|
||||
private ManagerRegistry $registry,
|
||||
|
|
@ -566,8 +567,8 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\ShopBundle\EventListener\OrderCompleteListener`
|
||||
```diff
|
||||
use Sylius\Bundle\CoreBundle\Mailer\OrderEmailManagerInterface;
|
||||
use Sylius\Bundle\ShopBundle\EmailManager\OrderEmailManagerInterface as DeprecatedOrderEmailManagerInterface;
|
||||
use Sylius\Bundle\CoreBundle\Mailer\OrderEmailManagerInterface;
|
||||
use Sylius\Bundle\ShopBundle\EmailManager\OrderEmailManagerInterface as DeprecatedOrderEmailManagerInterface;
|
||||
|
||||
public function __construct(
|
||||
- private DeprecatedOrderEmailManagerInterface|OrderEmailManagerInterface $orderEmailManager
|
||||
|
|
@ -577,8 +578,8 @@ your app as necessary.
|
|||
|
||||
`Sylius\Bundle\ShopBundle\Controller\ContactController`
|
||||
```diff
|
||||
use Sylius\Bundle\CoreBundle\Mailer\ContactEmailManagerInterface;
|
||||
use Sylius\Bundle\ShopBundle\EmailManager\ContactEmailManagerInterface as DeprecatedContactEmailManagerInterface;
|
||||
use Sylius\Bundle\CoreBundle\Mailer\ContactEmailManagerInterface;
|
||||
use Sylius\Bundle\ShopBundle\EmailManager\ContactEmailManagerInterface as DeprecatedContactEmailManagerInterface;
|
||||
|
||||
public function __construct(
|
||||
private RouterInterface $router,
|
||||
|
|
@ -594,8 +595,8 @@ your app as necessary.
|
|||
|
||||
`Sylius\Component\Addressing\Matcher\ZoneMatcher`
|
||||
```diff
|
||||
use Sylius\Component\Addressing\Repository\ZoneRepositoryInterface;
|
||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
||||
use Sylius\Component\Addressing\Repository\ZoneRepositoryInterface;
|
||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
||||
|
||||
public function __construct(
|
||||
- private RepositoryInterface|ZoneRepositoryInterface $zoneRepository
|
||||
|
|
@ -605,9 +606,9 @@ your app as necessary.
|
|||
|
||||
`Sylius\Component\Core\Updater\UnpaidOrdersStateUpdater`
|
||||
```diff
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use SM\Factory\Factory;
|
||||
use Sylius\Abstraction\StateMachine\StateMachineInterface;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use SM\Factory\Factory;
|
||||
use Sylius\Abstraction\StateMachine\StateMachineInterface;
|
||||
|
||||
public function __construct(
|
||||
private OrderRepositoryInterface $orderRepository,
|
||||
|
|
@ -624,7 +625,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Component\Core\Calculator\ProductVariantPriceCalculator`
|
||||
```diff
|
||||
use Sylius\Component\Core\Checker\ProductVariantLowestPriceDisplayCheckerInterface;
|
||||
use Sylius\Component\Core\Checker\ProductVariantLowestPriceDisplayCheckerInterface;
|
||||
|
||||
public function __construct(
|
||||
- private ?ProductVariantLowestPriceDisplayCheckerInterface $productVariantLowestPriceDisplayChecker = null,
|
||||
|
|
@ -634,7 +635,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Component\Core\Taxation\Applicator\OrderItemsTaxesApplicator`
|
||||
```diff
|
||||
use Sylius\Component\Core\Distributor\ProportionalIntegerDistributorInterface;
|
||||
use Sylius\Component\Core\Distributor\ProportionalIntegerDistributorInterface;
|
||||
|
||||
public function __construct(
|
||||
private CalculatorInterface $calculator,
|
||||
|
|
@ -648,7 +649,7 @@ your app as necessary.
|
|||
|
||||
`Sylius\Component\Core\Taxation\Applicator\OrderItemUnitsTaxesApplicator`
|
||||
```diff
|
||||
use Sylius\Component\Core\Distributor\ProportionalIntegerDistributorInterface;
|
||||
use Sylius\Component\Core\Distributor\ProportionalIntegerDistributorInterface;
|
||||
|
||||
public function __construct(
|
||||
CalculatorInterface $calculator,
|
||||
|
|
|
|||
|
|
@ -245,20 +245,29 @@ All the `setter` methods have been removed from the commands above and also ther
|
|||
- All translation resources are no longer exposed, as each one is now integrated into its main resource.
|
||||
|
||||
1. **ChannelPriceHistoryConfig**
|
||||
- The resource configuration has been removed, as it is now managed by the `Channel` resource. The endpoints `GET /api/v2/admin/channel-price-history-configs/{id}` and `PUT /api/v2/admin/channel-price-history-configs/{id}` are no longer available.
|
||||
- The resource configuration is now managed by the `Channel` resource.
|
||||
- Removed endpoints:
|
||||
- `GET /api/v2/admin/channel-price-history-configs/{id}`
|
||||
- `PUT /api/v2/admin/channel-price-history-configs/{id}`
|
||||
|
||||
1. **ShopBillingData**
|
||||
- The resource configuration has been removed, as it is now managed by the `Channel` resource. The endpoints `GET /api/v2/admin/shop-billing-datas/{id}` and `GET /api/v2/admin/channels/{code}/shop-billing-data` are no longer available.
|
||||
- The resource configuration is now managed by the `Channel` resource.
|
||||
- Removed endpoints:
|
||||
- `GET /api/v2/admin/shop-billing-datas/{id}`
|
||||
- `GET /api/v2/admin/channels/{code}/shop-billing-data`
|
||||
|
||||
1. **ZoneMember**
|
||||
- The resource configuration has been removed, as it is now managed by the `Zone` resource. The endpoints `GET /api/v2/admin/zone-members/{id}` and `GET /api/v2/admin/zones/{code}/members` are no longer available.
|
||||
- The resource configuration is now managed by the `Zone` resource.
|
||||
- Removed endpoints:
|
||||
- `GET /api/v2/admin/zone-members/{id}`
|
||||
- `GET /api/v2/admin/zones/{code}/members`
|
||||
|
||||
1. **ProductOptionValueTranslation**
|
||||
- A new resource configuration has been added for the `ProductOptionValueTranslation` resource it is now possible to manage translations for product option values.
|
||||
|
||||
## Request Body and Response Updates
|
||||
|
||||
### Request Body Changes
|
||||
### Request Payload Changes
|
||||
|
||||
#### ChannelPriceHistoryConfig
|
||||
Management for `ChannelPriceHistoryConfig` has been moved to the `Channel` resource. The `PUT` request for `Channel` now includes `channelPriceHistoryConfig` fields:
|
||||
|
|
@ -307,9 +316,9 @@ Management for `ChannelPriceHistoryConfig` has been moved to the `Channel` resou
|
|||
|
||||
### Response Changes
|
||||
|
||||
#### ChannelPriceHistoryConfig
|
||||
**Updated Channels `shop` `GET` Responses:**
|
||||
#### Channel
|
||||
```diff
|
||||
- "shopBillingData": "\/api\/v2\/admin\/shop-billing-datas\/{id}",
|
||||
+ "shopBillingData": {
|
||||
+ "@type": "ShopBillingData",
|
||||
+ "company": "Sylius Inc.",
|
||||
|
|
@ -319,14 +328,20 @@ Management for `ChannelPriceHistoryConfig` has been moved to the `Channel` resou
|
|||
+ "city": "eCommerce City",
|
||||
+ "postcode": "12345"
|
||||
+ }
|
||||
- "channelPriceHistoryConfig": "/api/v2/admin/channel-price-history-configs/{id}"
|
||||
+ "channelPriceHistoryConfig": {
|
||||
+ "lowestPriceForDiscountedProductsCheckingPeriod": 30,
|
||||
+ "lowestPriceForDiscountedProductsVisible": true,
|
||||
+ "taxonsExcludedFromShowingLowestPrice": ["clearance", "seasonal"]
|
||||
+ }
|
||||
```
|
||||
|
||||
#### Order
|
||||
- `Id` has been removed from `shop` `GET` responses.
|
||||
- `Order number` has been removed from orders in `shop` item `GET`.
|
||||
- `Channel` has been added to orders in `shop` item `GET`.
|
||||
- `Customer email` is now exposed in the order `GET` response for `shop`.
|
||||
- `State` has been added to the order `GET` response for `shop`.
|
||||
- `id` has been removed from `shop` `GET` responses.
|
||||
- `orderNumber` has been removed from orders in `shop` item `GET`.
|
||||
- `channel` has been added to orders in `shop` item `GET`.
|
||||
- `customerEmail` is now exposed in the order `GET` response for `shop`.
|
||||
- `state` has been added to the order `GET` response for `shop`.
|
||||
- `customerIp` has been added to the admin serialization configuration.
|
||||
|
||||
```diff
|
||||
|
|
@ -345,7 +360,7 @@ Management for `ChannelPriceHistoryConfig` has been moved to the `Channel` resou
|
|||
The `sylius:admin:order_item_unit:show` serialization group has been removed as endpoints for `OrderItemUnit` are no longer exposed.
|
||||
|
||||
#### Translations
|
||||
`Id` has been removed from serialization for all translation resources.
|
||||
`id` has been removed from serialization for all translation resources.
|
||||
|
||||
**Example: `ShippingMethod` Get Response:**
|
||||
```diff
|
||||
|
|
@ -361,7 +376,7 @@ The `sylius:admin:order_item_unit:show` serialization group has been removed as
|
|||
```
|
||||
|
||||
#### ProductAssociationType
|
||||
`Id` is no longer exposed on the `shop` `GET` endpoint.
|
||||
`id` is no longer exposed on the `shop` `GET` endpoint.
|
||||
|
||||
```diff
|
||||
{
|
||||
|
|
@ -392,7 +407,7 @@ The `sylius:admin:order_item_unit:show` serialization group has been removed as
|
|||
```
|
||||
|
||||
#### ProductOption
|
||||
`Id` has been removed from serialization.
|
||||
`id` has been removed from serialization.
|
||||
|
||||
```diff
|
||||
{
|
||||
|
|
@ -417,7 +432,7 @@ The `sylius:admin:order_item_unit:show` serialization group has been removed as
|
|||
```
|
||||
|
||||
#### ProductOptionValue
|
||||
`Id` has been removed from serialization.
|
||||
`id` has been removed from serialization.
|
||||
|
||||
```diff
|
||||
{
|
||||
|
|
@ -440,7 +455,7 @@ The `sylius:admin:order_item_unit:show` serialization group has been removed as
|
|||
The `sylius:admin:province:index` serialization group has been added for the `index` response.
|
||||
|
||||
#### ShopBillingData
|
||||
`Id` has been removed from serialization, and the `sylius:admin:shop_billing_data:show` serialization group has been removed. `Company`, `taxId`, `countryCode`, `street`, `city`, and `postcode` are now exposed on `channels` `admin` index and show views.
|
||||
`id` has been removed from serialization, and the `sylius:admin:shop_billing_data:show` serialization group has been removed. `Company`, `taxId`, `countryCode`, `street`, `city`, and `postcode` are now exposed on `channels` `admin` index and show views.
|
||||
|
||||
**Example: Channel Get Response**
|
||||
```diff
|
||||
|
|
@ -457,7 +472,7 @@ The `sylius:admin:province:index` serialization group has been added for the `in
|
|||
```
|
||||
|
||||
#### ZoneMember
|
||||
`Id` and `belongsTo` have been removed from serialization, and `code` has been added to the response for `zones` admin index and show. The `ZoneMember` get endpoint has been removed and is now accessible only through the `Zone`.
|
||||
`id` and `belongsTo` have been removed from serialization, and `code` has been added to the response for `zones` admin index and show. The `ZoneMember` get endpoint has been removed and is now accessible only through the `Zone`.
|
||||
|
||||
**Example: Zone Get Response:**
|
||||
```diff
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue