From 2b31eb0c7e7a3a8c3a508f13f4811653451060a9 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 21 Oct 2024 15:24:42 +0200 Subject: [PATCH 1/3] [Composer] Bump doctrine/collections dependency --- composer.json | 2 +- src/Sylius/Bundle/UiBundle/composer.json | 2 +- src/Sylius/Component/Attribute/composer.json | 2 +- src/Sylius/Component/Customer/composer.json | 2 +- src/Sylius/Component/Promotion/composer.json | 2 +- src/Sylius/Component/Review/composer.json | 2 +- src/Sylius/Component/User/composer.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 2aa0a4d8fd..af40236cb0 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "api-platform/core": "^3.4.2", "babdev/pagerfanta-bundle": "^4.4", "behat/transliterator": "^1.5", - "doctrine/collections": "^1.8", + "doctrine/collections": "^2.2", "doctrine/common": "^3.2", "doctrine/dbal": "^3.9", "doctrine/doctrine-bundle": "^2.13", diff --git a/src/Sylius/Bundle/UiBundle/composer.json b/src/Sylius/Bundle/UiBundle/composer.json index 6e19f2514c..083ead0ad8 100644 --- a/src/Sylius/Bundle/UiBundle/composer.json +++ b/src/Sylius/Bundle/UiBundle/composer.json @@ -29,7 +29,7 @@ ], "require": { "php": "^8.2", - "doctrine/collections": "^1.8", + "doctrine/collections": "^2.2", "knplabs/knp-menu": "^3.5", "knplabs/knp-menu-bundle": "^3.4", "laminas/laminas-stdlib": "^3.19", diff --git a/src/Sylius/Component/Attribute/composer.json b/src/Sylius/Component/Attribute/composer.json index e84b037956..b86c1a1352 100644 --- a/src/Sylius/Component/Attribute/composer.json +++ b/src/Sylius/Component/Attribute/composer.json @@ -26,7 +26,7 @@ ], "require": { "php": "^8.2", - "doctrine/collections": "^1.8", + "doctrine/collections": "^2.2", "sylius/registry": "^1.6", "sylius/resource": "^1.12", "symfony/validator": "^6.4 || ^7.1" diff --git a/src/Sylius/Component/Customer/composer.json b/src/Sylius/Component/Customer/composer.json index 833fdaa720..62c96a2c51 100644 --- a/src/Sylius/Component/Customer/composer.json +++ b/src/Sylius/Component/Customer/composer.json @@ -32,7 +32,7 @@ ], "require": { "php": "^8.2", - "doctrine/collections": "^1.8", + "doctrine/collections": "^2.2", "sylius/resource": "^1.12" }, "require-dev": { diff --git a/src/Sylius/Component/Promotion/composer.json b/src/Sylius/Component/Promotion/composer.json index b9f341ee80..c33dd5a70f 100644 --- a/src/Sylius/Component/Promotion/composer.json +++ b/src/Sylius/Component/Promotion/composer.json @@ -26,7 +26,7 @@ ], "require": { "php": "^8.2", - "doctrine/collections": "^1.8", + "doctrine/collections": "^2.2", "sylius/registry": "^1.6", "sylius/resource": "^1.12" }, diff --git a/src/Sylius/Component/Review/composer.json b/src/Sylius/Component/Review/composer.json index 2d29abe52d..81f02589bb 100644 --- a/src/Sylius/Component/Review/composer.json +++ b/src/Sylius/Component/Review/composer.json @@ -38,7 +38,7 @@ ], "require": { "php": "^8.2", - "doctrine/collections": "^1.8", + "doctrine/collections": "^2.2", "sylius/resource": "^1.12" }, "require-dev": { diff --git a/src/Sylius/Component/User/composer.json b/src/Sylius/Component/User/composer.json index 260c56a904..9b6522652e 100644 --- a/src/Sylius/Component/User/composer.json +++ b/src/Sylius/Component/User/composer.json @@ -34,7 +34,7 @@ ], "require": { "php": "^8.2", - "doctrine/collections": "^1.8", + "doctrine/collections": "^2.2", "sylius/resource": "^1.12", "symfony/polyfill-mbstring": "^1.31", "symfony/security-core": "^6.4 || ^7.1" From 4779db26f0d901fb913d2ed5d3a64ec1831c3bac Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 21 Oct 2024 15:33:34 +0200 Subject: [PATCH 2/3] [API] Adjust contract tests fixtures after bumping doctrine/collections dependency --- tests/Api/DataFixtures/ORM/cart.yaml | 10 -- .../Api/DataFixtures/ORM/cart/promotion.yaml | 2 - .../catalog_promotion/catalog_promotion.yaml | 1 - .../Api/DataFixtures/ORM/payment_method.yaml | 34 +++---- .../Api/DataFixtures/ORM/product/product.yaml | 19 ---- .../ORM/product/product_option.yaml | 6 -- .../ORM/product/product_variant.yaml | 30 ++---- .../product_variant_with_lowest_price.yaml | 6 -- .../product_variant_with_original_price.yaml | 11 --- .../product/product_with_many_locales.yaml | 20 ---- .../product/products_with_associations.yaml | 22 ----- .../DataFixtures/ORM/promotion/promotion.yaml | 6 -- .../Api/DataFixtures/ORM/shipping_method.yaml | 34 +++---- tests/Api/DataFixtures/ORM/statistics.yaml | 3 +- tests/Api/DataFixtures/ORM/taxonomy.yaml | 94 +++++++++---------- 15 files changed, 92 insertions(+), 206 deletions(-) diff --git a/tests/Api/DataFixtures/ORM/cart.yaml b/tests/Api/DataFixtures/ORM/cart.yaml index 534b2d686a..debf6ce7fd 100644 --- a/tests/Api/DataFixtures/ORM/cart.yaml +++ b/tests/Api/DataFixtures/ORM/cart.yaml @@ -10,8 +10,6 @@ Sylius\Component\Core\Model\Product: code: 'MUG' channels: ['@channel_web'] currentLocale: 'en_US' - translations: - en_US: '@product_translation_mug' options: ['@product_option_color'] Sylius\Component\Core\Model\ProductTranslation: @@ -27,8 +25,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_BLUE' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_translation_mug_blue' optionValues: ['@product_option_value_color_blue'] channelPricings: WEB: '@channel_pricing_product_variant_mug_blue_web' @@ -41,8 +37,6 @@ Sylius\Component\Core\Model\ProductVariant: optionValues: ['@product_option_value_color_blue'] product: '@product_mug' shippingRequired: false - translations: - en_US: '@product_variant_translation_mug_nft' product_variant_free_mug_nft: channelPricings: WEB: '@channel_pricing_product_variant_free_mug_nft_web' @@ -51,8 +45,6 @@ Sylius\Component\Core\Model\ProductVariant: optionValues: ['@product_option_value_color_blue'] product: '@product_mug' shippingRequired: false - translations: - en_US: '@product_variant_translation_free_mug_nft' Sylius\Component\Product\Model\ProductVariantTranslation: product_variant_translation_mug_blue: @@ -92,8 +84,6 @@ Sylius\Component\Product\Model\ProductOptionValue: currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_blue' Sylius\Component\Product\Model\ProductOptionValueTranslation: product_option_value_translation_blue: diff --git a/tests/Api/DataFixtures/ORM/cart/promotion.yaml b/tests/Api/DataFixtures/ORM/cart/promotion.yaml index a82751028a..3e1fe01b8b 100644 --- a/tests/Api/DataFixtures/ORM/cart/promotion.yaml +++ b/tests/Api/DataFixtures/ORM/cart/promotion.yaml @@ -10,8 +10,6 @@ Sylius\Component\Core\Model\Promotion: usageLimit: 1 used: 0 couponBased: false - translations: - - '@promotion_50_off_en' actions: - '@action_percentage_discount_50' rules: diff --git a/tests/Api/DataFixtures/ORM/catalog_promotion/catalog_promotion.yaml b/tests/Api/DataFixtures/ORM/catalog_promotion/catalog_promotion.yaml index a7116cc3bb..6cacc279d0 100644 --- a/tests/Api/DataFixtures/ORM/catalog_promotion/catalog_promotion.yaml +++ b/tests/Api/DataFixtures/ORM/catalog_promotion/catalog_promotion.yaml @@ -3,7 +3,6 @@ Sylius\Component\Core\Model\CatalogPromotion: name: 'Mugs discount' code: 'mugs_discount' channels: ['@channel_web'] - translations: ['@catalog_promotion_translation'] enabled: true exclusive: false diff --git a/tests/Api/DataFixtures/ORM/payment_method.yaml b/tests/Api/DataFixtures/ORM/payment_method.yaml index 660ad23b78..f17555845e 100644 --- a/tests/Api/DataFixtures/ORM/payment_method.yaml +++ b/tests/Api/DataFixtures/ORM/payment_method.yaml @@ -1,3 +1,20 @@ +Sylius\Component\Payment\Model\PaymentMethodTranslation: + payment_method_cash_on_delivery_translation: + name: 'Cash on delivery' + locale: 'en_US' + description: '' + translatable: '@payment_method_cash_on_delivery' + payment_method_bank_transfer_translation: + name: 'Bank transfer' + locale: 'en_US' + description: '' + translatable: '@payment_method_bank_transfer' + disabled_payment_method_translation: + name: 'Disabled payment method' + locale: 'en_US' + description: '' + translatable: '@disabled_payment_method' + Sylius\Component\Core\Model\PaymentMethod: payment_method_cash_on_delivery: code: 'CASH_ON_DELIVERY' @@ -27,20 +44,3 @@ Sylius\Bundle\PayumBundle\Model\GatewayConfig: gatewayName: 'Offline' factoryName: 'offline' config: [] - -Sylius\Component\Payment\Model\PaymentMethodTranslation: - payment_method_cash_on_delivery_translation: - name: 'Cash on delivery' - locale: 'en_US' - description: '' - translatable: '@payment_method_cash_on_delivery' - payment_method_bank_transfer_translation: - name: 'Bank transfer' - locale: 'en_US' - description: '' - translatable: '@payment_method_bank_transfer' - disabled_payment_method_translation: - name: 'Disabled payment method' - locale: 'en_US' - description: '' - translatable: '@disabled_payment_method' diff --git a/tests/Api/DataFixtures/ORM/product/product.yaml b/tests/Api/DataFixtures/ORM/product/product.yaml index b02f8aea47..13ac016b2e 100644 --- a/tests/Api/DataFixtures/ORM/product/product.yaml +++ b/tests/Api/DataFixtures/ORM/product/product.yaml @@ -6,9 +6,6 @@ Sylius\Component\Core\Model\Product: mainTaxon: '@taxon_mugs' channels: ['@channel_web'] currentLocale: 'en_US' - translations: - en_US: '@product_translation_mug_en_US' - pl_PL: '@product_translation_mug_pl_PL' attributes: - '@product_attribute_value_material_en_US' - '@product_attribute_value_material_pl_PL' @@ -16,15 +13,11 @@ Sylius\Component\Core\Model\Product: code: 'CAP' channels: ['@channel_web'] currentLocale: 'en_US' - translations: - en_US: '@product_translation_cap_en_US' options: ['@product_option_color'] product_socks: code: 'SOCKS' channels: ['@channel_web'] currentLocale: 'en_US' - translations: - en_US: '@product_translation_socks_en_US' options: ['@product_option_color'] Sylius\Component\Core\Model\ProductTranslation: @@ -62,8 +55,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_BLUE' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_translation_mug_blue' optionValues: ['@product_option_value_color_blue'] channelPricings: WEB: '@channel_pricing_mug_blue_web' @@ -72,8 +63,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_RED' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_translation_mug_red' optionValues: ['@product_option_value_color_red'] channelPricings: WEB: '@channel_pricing_mug_red_web' @@ -125,15 +114,11 @@ Sylius\Component\Product\Model\ProductOptionValue: currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_blue' product_option_value_color_red: code: 'COLOR_RED' currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_red' Sylius\Component\Product\Model\ProductOptionValueTranslation: product_option_value_translation_blue: @@ -195,8 +180,6 @@ Sylius\Component\Product\Model\ProductAttribute: code: 'MATERIAL' type: 'text' storageType: 'text' - translations: - - '@product_attribute_translation_material_en_US' Sylius\Component\Product\Model\ProductAttributeValue: product_attribute_value_material_en_US: @@ -245,8 +228,6 @@ Sylius\Component\Product\Model\ProductAssociation: Sylius\Component\Product\Model\ProductAssociationType: product_association_type: code: 'similar_products' - translations: - en_US: '@product_association_type_translation' Sylius\Component\Product\Model\ProductAssociationTypeTranslation: product_association_type_translation: diff --git a/tests/Api/DataFixtures/ORM/product/product_option.yaml b/tests/Api/DataFixtures/ORM/product/product_option.yaml index 8f17df9ebb..675ef36e13 100644 --- a/tests/Api/DataFixtures/ORM/product/product_option.yaml +++ b/tests/Api/DataFixtures/ORM/product/product_option.yaml @@ -1,8 +1,6 @@ Sylius\Component\Product\Model\ProductOption: product_option_color: code: 'COLOR' - translations: - - '@product_option_translation_color' Sylius\Component\Product\Model\ProductOptionTranslation: product_option_translation_color: @@ -16,15 +14,11 @@ Sylius\Component\Product\Model\ProductOptionValue: currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_blue' product_option_value_color_red: code: 'COLOR_RED' currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_red' Sylius\Component\Product\Model\ProductOptionValueTranslation: product_option_value_translation_blue: diff --git a/tests/Api/DataFixtures/ORM/product/product_variant.yaml b/tests/Api/DataFixtures/ORM/product/product_variant.yaml index b74d854419..c4bb62eb31 100644 --- a/tests/Api/DataFixtures/ORM/product/product_variant.yaml +++ b/tests/Api/DataFixtures/ORM/product/product_variant.yaml @@ -4,16 +4,6 @@ Sylius\Component\Core\Model\Product: currentLocale: en code: 'MUG_SW' -Sylius\Component\Product\Model\ProductVariantTranslation: - product_variant_translation: - name: 'Mug' - locale: en_US - translatable: '@product_variant' - product_variant_2_translation: - name: 'Mug 2' - locale: en_US - translatable: '@product_variant_2' - Sylius\Component\Core\Model\ProductVariant: product_variant: code: 'MUG' @@ -25,8 +15,6 @@ Sylius\Component\Core\Model\ProductVariant: optionValues: ['@product_option_value_color_blue'] channelPricings: channel_web: '@product_variant_channel_web_pricing' - translations: - - '@product_variant_translation' enabled: true tracked: true onHold: 0 @@ -46,8 +34,16 @@ Sylius\Component\Core\Model\ProductVariant: position: 2 channelPricings: channel_web: '@product_variant_2_channel_web_pricing' - translations: - - '@product_variant_2_translation' + +Sylius\Component\Product\Model\ProductVariantTranslation: + product_variant_translation: + name: 'Mug' + locale: en_US + translatable: '@product_variant' + product_variant_2_translation: + name: 'Mug 2' + locale: en_US + translatable: '@product_variant_2' Sylius\Component\Core\Model\ChannelPricing: product_variant_channel_web_pricing: @@ -61,8 +57,6 @@ Sylius\Component\Product\Model\ProductOption: product_option_color: code: 'COLOR' currentLocale: 'en_US' - translations: - - '@product_option_translation_en_EN' Sylius\Component\Product\Model\ProductOptionTranslation: product_option_translation_en_EN: @@ -76,15 +70,11 @@ Sylius\Component\Product\Model\ProductOptionValue: currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_blue' product_option_value_color_red: code: 'COLOR_RED' currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_red' Sylius\Component\Product\Model\ProductOptionValueTranslation: product_option_value_translation_blue: diff --git a/tests/Api/DataFixtures/ORM/product/product_variant_with_lowest_price.yaml b/tests/Api/DataFixtures/ORM/product/product_variant_with_lowest_price.yaml index 699d1053b5..664aac9b84 100644 --- a/tests/Api/DataFixtures/ORM/product/product_variant_with_lowest_price.yaml +++ b/tests/Api/DataFixtures/ORM/product/product_variant_with_lowest_price.yaml @@ -39,8 +39,6 @@ Sylius\Component\Core\Model\Product: code: 'MUG' channels: ['@channel_home', '@channel_fashion'] currentLocale: 'en_US' - translations: - en_US: '@product_translation_mug' Sylius\Component\Core\Model\ProductTranslation: product_translation_mug: @@ -55,8 +53,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_BLUE' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_translation_mug_blue' channelPricings: HOME: '@channel_pricing_product_variant_mug_blue_home' FASHION: '@channel_pricing_product_variant_mug_blue_fashion' @@ -65,8 +61,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_RED' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_translation_mug_red' channelPricings: HOME: '@channel_pricing_product_variant_mug_red_home' FASHION: '@channel_pricing_product_variant_mug_red_fashion' diff --git a/tests/Api/DataFixtures/ORM/product/product_variant_with_original_price.yaml b/tests/Api/DataFixtures/ORM/product/product_variant_with_original_price.yaml index c8d70b13e1..ea08c5a65a 100644 --- a/tests/Api/DataFixtures/ORM/product/product_variant_with_original_price.yaml +++ b/tests/Api/DataFixtures/ORM/product/product_variant_with_original_price.yaml @@ -28,8 +28,6 @@ Sylius\Component\Core\Model\Product: code: 'MUG' channels: ['@channel_web'] currentLocale: 'en_US' - translations: - en_US: '@product_translation_mug' options: ['@product_option_color'] Sylius\Component\Core\Model\ProductTranslation: @@ -45,18 +43,13 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_BLUE' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_translation_mug_blue' optionValues: ['@product_option_value_color_blue'] channelPricings: WEB: '@channel_pricing_product_variant_mug_blue_web' - product_variant_mug_red: code: 'MUG_RED' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_translation_mug_red' optionValues: ['@product_option_value_color_red'] channelPricings: WEB: '@channel_pricing_product_variant_mug_red_web' @@ -90,15 +83,11 @@ Sylius\Component\Product\Model\ProductOptionValue: currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_blue' product_option_value_color_red: code: 'COLOR_RED' currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_red' Sylius\Component\Product\Model\ProductOptionValueTranslation: product_option_value_translation_blue: diff --git a/tests/Api/DataFixtures/ORM/product/product_with_many_locales.yaml b/tests/Api/DataFixtures/ORM/product/product_with_many_locales.yaml index 1ca1f9e0fe..69ec7decc6 100644 --- a/tests/Api/DataFixtures/ORM/product/product_with_many_locales.yaml +++ b/tests/Api/DataFixtures/ORM/product/product_with_many_locales.yaml @@ -28,17 +28,11 @@ Sylius\Component\Core\Model\Product: code: 'MUG' channels: ['@channel_web'] currentLocale: 'en_US' - translations: - en_US: '@product_translation_mug_en_US' - pl_PL: '@product_translation_mug_pl_PL' - de_DE: '@product_translation_mug_de_DE' options: ['@product_option_color'] product_cup: code: 'CUP' channels: [ '@channel_web' ] currentLocale: 'en_US' - translations: - en_US: '@product_translation_cup_en_US' Sylius\Component\Core\Model\ProductTranslation: product_translation_mug_en_US: @@ -75,9 +69,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_BLUE' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_mug_blue_translation_en_EN' - pl_PL: '@product_variant_mug_blue_translation_pl_PL' optionValues: ['@product_option_value_color_blue'] channelPricings: WEB: '@channel_pricing_product_variant_mug_blue_web' @@ -86,9 +77,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_RED' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_mug_red_translation_en_EN' - pl_PL: '@product_variant_mug_red_translation_pl_PL' optionValues: ['@product_option_value_color_red'] channelPricings: WEB: '@channel_pricing_product_variant_mug_red_web' @@ -124,8 +112,6 @@ Sylius\Component\Product\Model\ProductOption: product_option_color: code: 'COLOR' currentLocale: 'en_US' - translations: - - '@product_option_translation_en_EN' Sylius\Component\Product\Model\ProductOptionTranslation: product_option_translation_en_EN: @@ -139,15 +125,11 @@ Sylius\Component\Product\Model\ProductOptionValue: currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_blue' product_option_value_color_red: code: 'COLOR_RED' currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_red' Sylius\Component\Product\Model\ProductOptionValueTranslation: product_option_value_translation_blue: @@ -168,8 +150,6 @@ Sylius\Component\Product\Model\ProductAssociation: Sylius\Component\Product\Model\ProductAssociationType: product_association_type: code: 'similar_products' - translations: - en_US: '@product_association_type_translation' Sylius\Component\Product\Model\ProductAssociationTypeTranslation: product_association_type_translation: diff --git a/tests/Api/DataFixtures/ORM/product/products_with_associations.yaml b/tests/Api/DataFixtures/ORM/product/products_with_associations.yaml index 286d57802d..a530eac793 100644 --- a/tests/Api/DataFixtures/ORM/product/products_with_associations.yaml +++ b/tests/Api/DataFixtures/ORM/product/products_with_associations.yaml @@ -24,27 +24,19 @@ Sylius\Component\Core\Model\Product: code: 'MUG' channels: ['@channel_web'] currentLocale: 'en_US' - translations: - en_US: '@product_translation_mug_en_US' options: ['@product_option_color'] product_cup: code: 'CUP' channels: [ '@channel_web' ] currentLocale: 'en_US' - translations: - en_US: '@product_translation_cup_en_US' product_tankard: code: 'TANKARD' channels: [ '@channel_web' ] currentLocale: 'en_US' - translations: - en_US: '@product_translation_tankard_en_US' product_hat: code: 'HAT' channels: [ '@channel_web' ] currentLocale: 'en_US' - translations: - en_US: '@product_translation_hat_en_US' enabled: false Sylius\Component\Core\Model\ProductTranslation: @@ -82,8 +74,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_BLUE' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_mug_blue_translation_en_EN' optionValues: ['@product_option_value_color_blue'] channelPricings: WEB: '@channel_pricing_product_variant_mug_blue_web' @@ -92,8 +82,6 @@ Sylius\Component\Core\Model\ProductVariant: code: 'MUG_RED' product: '@product_mug' currentLocale: 'en_US' - translations: - en_US: '@product_variant_mug_red_translation_en_EN' optionValues: ['@product_option_value_color_red'] channelPricings: WEB: '@channel_pricing_product_variant_mug_red_web' @@ -121,8 +109,6 @@ Sylius\Component\Product\Model\ProductOption: product_option_color: code: 'COLOR' currentLocale: 'en_US' - translations: - - '@product_option_translation_en_EN' Sylius\Component\Product\Model\ProductOptionTranslation: product_option_translation_en_EN: @@ -136,15 +122,11 @@ Sylius\Component\Product\Model\ProductOptionValue: currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_blue' product_option_value_color_red: code: 'COLOR_RED' currentLocale: 'en_US' fallbackLocale: 'en_US' option: '@product_option_color' - translations: - - '@product_option_value_translation_red' Sylius\Component\Product\Model\ProductOptionValueTranslation: product_option_value_translation_blue: @@ -169,12 +151,8 @@ Sylius\Component\Product\Model\ProductAssociation: Sylius\Component\Product\Model\ProductAssociationType: product_association_type: code: 'similar_products' - translations: - en_US: '@product_association_type_translation' another_product_association_type: code: 'another_similar_products' - translations: - en_US: '@another_product_association_type_translation' Sylius\Component\Product\Model\ProductAssociationTypeTranslation: product_association_type_translation: diff --git a/tests/Api/DataFixtures/ORM/promotion/promotion.yaml b/tests/Api/DataFixtures/ORM/promotion/promotion.yaml index 5daeb56943..acf6c3bc60 100644 --- a/tests/Api/DataFixtures/ORM/promotion/promotion.yaml +++ b/tests/Api/DataFixtures/ORM/promotion/promotion.yaml @@ -10,8 +10,6 @@ Sylius\Component\Core\Model\Promotion: usageLimit: 1 used: 0 couponBased: false - translations: - - '@promotion_50_off_en' promotion_1_off: code: 'dollar_off' name: '1 dollar off each item' @@ -21,8 +19,6 @@ Sylius\Component\Core\Model\Promotion: exclusive: false appliesToDiscounted: true couponBased: true - translations: - - '@promotion_1_off_en' promotion_back_to_school: code: 'back_to_school' name: 'Back to school' @@ -33,8 +29,6 @@ Sylius\Component\Core\Model\Promotion: appliesToDiscounted: true couponBased: false archivedAt: - translations: - - '@promotion_back_to_school_en' Sylius\Component\Promotion\Model\PromotionTranslation: promotion_50_off_en: diff --git a/tests/Api/DataFixtures/ORM/shipping_method.yaml b/tests/Api/DataFixtures/ORM/shipping_method.yaml index 15935c63ae..f0cd134aa3 100644 --- a/tests/Api/DataFixtures/ORM/shipping_method.yaml +++ b/tests/Api/DataFixtures/ORM/shipping_method.yaml @@ -1,3 +1,20 @@ +Sylius\Component\Shipping\Model\ShippingMethodTranslation: + shipping_method_translation_ups: + name: 'UPS' + locale: 'en_US' + description: '' + translatable: '@shipping_method_ups' + shipping_method_translation_dhl: + name: 'DHL' + locale: 'en_US' + description: '' + translatable: '@shipping_method_dhl' + shipping_method_translation_fedex: + name: 'FedEx' + locale: 'en_US' + description: '' + translatable: '@shipping_method_fedex' + Sylius\Component\Core\Model\ShippingMethod: shipping_method_ups: code: 'UPS' @@ -39,23 +56,6 @@ Sylius\Component\Core\Model\ShippingMethod: translations: ["@shipping_method_translation_fedex"] channels: ["@channel_mobile"] -Sylius\Component\Shipping\Model\ShippingMethodTranslation: - shipping_method_translation_ups: - name: 'UPS' - locale: 'en_US' - description: '' - translatable: '@shipping_method_ups' - shipping_method_translation_dhl: - name: 'DHL' - locale: 'en_US' - description: '' - translatable: '@shipping_method_dhl' - shipping_method_translation_fedex: - name: 'FedEx' - locale: 'en_US' - description: '' - translatable: '@shipping_method_fedex' - Sylius\Component\Addressing\Model\ZoneMember: zone_member_{US, FR, DE}: code: '' diff --git a/tests/Api/DataFixtures/ORM/statistics.yaml b/tests/Api/DataFixtures/ORM/statistics.yaml index 6ff01742e9..8d686379eb 100644 --- a/tests/Api/DataFixtures/ORM/statistics.yaml +++ b/tests/Api/DataFixtures/ORM/statistics.yaml @@ -2,14 +2,13 @@ Sylius\Component\Core\Model\Product: product: code: 'PRODUCT' channels: ['@channel_web'] - translations: - en_US: '@product_translation' Sylius\Component\Core\Model\ProductTranslation: product_translation: slug: 'product' locale: 'en_US' name: 'Product' + translatable: '@product' Sylius\Component\Core\Model\ProductVariant: product_variant_that_costs_1000: diff --git a/tests/Api/DataFixtures/ORM/taxonomy.yaml b/tests/Api/DataFixtures/ORM/taxonomy.yaml index a991676350..ce01e3f62b 100644 --- a/tests/Api/DataFixtures/ORM/taxonomy.yaml +++ b/tests/Api/DataFixtures/ORM/taxonomy.yaml @@ -33,53 +33,6 @@ Sylius\Component\Locale\Model\Locale: locale_pl_pl: code: pl_PL -Sylius\Component\Core\Model\Taxon: - category_taxon: - code: "CATEGORY" - currentLocale: "en_US" - translations: ["@en_us_category_translation"] - images: ["@category_taxon_thumbnail"] - children: ["@mug_taxon", "@hat_taxon", "@t_shirt_taxon"] - mug_taxon: - code: "MUG" - currentLocale: "en_US" - translations: ["@en_us_mug_taxon_translation", "@de_de_mug_taxon_translation"] - parent: "@category_taxon" - position: 0 - hat_taxon: - code: "HAT" - currentLocale: "en_US" - translations: ["@en_us_hat_translation", "@de_de_hat_translation"] - parent: "@category_taxon" - position: 1 - t_shirt_taxon: - code: "T_SHIRTS" - currentLocale: "en_US" - translations: ["@en_us_t_shirt_taxon_translation", "@de_de_t_shirt_taxon_translation"] - images: ["@t_shirt_taxon_thumbnail"] - children: ["@men_t_shirt_taxon", "@women_t_shirt_taxon"] - parent: "@category_taxon" - position: 2 - men_t_shirt_taxon: - code: "MEN_T_SHIRTS" - currentLocale: "en_US" - translations: ["@en_us_men_t_shirt_translation", "@de_de_men_t_shirt_translation"] - parent: "@t_shirt_taxon" - women_t_shirt_taxon: - code: "WOMEN_T_SHIRTS" - currentLocale: "en_US" - translations: ["@en_us_women_t_shirt_translation", "@de_de_women_t_shirt_translation"] - parent: "@t_shirt_taxon" - enabled: false - brand_taxon: - code: "BRAND" - currentLocale: "en_US" - translations: ["@en_us_brand_translation", "@de_de_brand_translation"] - yet_another_taxon: - code: "de?lol=xd#boom" - currentLocale: "en_US" - translations: ["@en_us_yet_another_taxon_translation"] - Sylius\Component\Taxonomy\Model\TaxonTranslation: en_us_category_translation: slug: "categories" @@ -164,6 +117,53 @@ Sylius\Component\Taxonomy\Model\TaxonTranslation: description: "Einige Beschreibung Lorem ipsum dolor sit amet." translatable: "@brand_taxon" +Sylius\Component\Core\Model\Taxon: + category_taxon: + code: "CATEGORY" + currentLocale: "en_US" + translations: ["@en_us_category_translation"] + images: ["@category_taxon_thumbnail"] + children: ["@mug_taxon", "@hat_taxon", "@t_shirt_taxon"] + mug_taxon: + code: "MUG" + currentLocale: "en_US" + translations: ["@en_us_mug_taxon_translation", "@de_de_mug_taxon_translation"] + parent: "@category_taxon" + position: 0 + hat_taxon: + code: "HAT" + currentLocale: "en_US" + translations: ["@en_us_hat_translation", "@de_de_hat_translation"] + parent: "@category_taxon" + position: 1 + t_shirt_taxon: + code: "T_SHIRTS" + currentLocale: "en_US" + translations: ["@en_us_t_shirt_taxon_translation", "@de_de_t_shirt_taxon_translation"] + images: ["@t_shirt_taxon_thumbnail"] + children: ["@men_t_shirt_taxon", "@women_t_shirt_taxon"] + parent: "@category_taxon" + position: 2 + men_t_shirt_taxon: + code: "MEN_T_SHIRTS" + currentLocale: "en_US" + translations: ["@en_us_men_t_shirt_translation", "@de_de_men_t_shirt_translation"] + parent: "@t_shirt_taxon" + women_t_shirt_taxon: + code: "WOMEN_T_SHIRTS" + currentLocale: "en_US" + translations: ["@en_us_women_t_shirt_translation", "@de_de_women_t_shirt_translation"] + parent: "@t_shirt_taxon" + enabled: false + brand_taxon: + code: "BRAND" + currentLocale: "en_US" + translations: ["@en_us_brand_translation", "@de_de_brand_translation"] + yet_another_taxon: + code: "de?lol=xd#boom" + currentLocale: "en_US" + translations: ["@en_us_yet_another_taxon_translation"] + Sylius\Component\Core\Model\TaxonImage: category_taxon_thumbnail: type: "thumbnail" From 8f095aea42e0f79b11debd58b3a37da0803bbb82 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 21 Oct 2024 16:01:08 +0200 Subject: [PATCH 3/3] [API] Fix order of channel pricing log entries in contract tests --- ...get_channel_pricing_log_entries_response.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Api/Responses/admin/channel_pricing_log_entry/get_channel_pricing_log_entries_response.json b/tests/Api/Responses/admin/channel_pricing_log_entry/get_channel_pricing_log_entries_response.json index 0ddc2b864a..e24aafb67c 100644 --- a/tests/Api/Responses/admin/channel_pricing_log_entry/get_channel_pricing_log_entries_response.json +++ b/tests/Api/Responses/admin/channel_pricing_log_entry/get_channel_pricing_log_entries_response.json @@ -11,14 +11,6 @@ "originalPrice": null, "loggedAt": "@date@" }, - { - "@id": "\/api\/v2\/admin\/channel-pricing-log-entries\/@integer@", - "@type": "ChannelPricingLogEntry", - "channelPricing": "\/api\/v2\/admin\/product-variants\/@string@\/channel-pricings\/@string@", - "price": 1000, - "originalPrice": 2000, - "loggedAt": "@date@" - }, { "@id": "\/api\/v2\/admin\/channel-pricing-log-entries\/@integer@", "@type": "ChannelPricingLogEntry", @@ -34,6 +26,14 @@ "price": 2000, "originalPrice": null, "loggedAt": "@date@" + }, + { + "@id": "\/api\/v2\/admin\/channel-pricing-log-entries\/@integer@", + "@type": "ChannelPricingLogEntry", + "channelPricing": "\/api\/v2\/admin\/product-variants\/@string@\/channel-pricings\/@string@", + "price": 1000, + "originalPrice": 2000, + "loggedAt": "@date@" } ], "hydra:totalItems": 4,