This PR was merged into the 1.12 branch.
Discussion
----------
| Q | A |
|-----------------|--------------------------------------------------------------|
| Branch? | 1.12 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Related tickets | fixes#14539, successor of #14597 |
| License | MIT |
PR created by @Nek- was great, but was involving some sort of changes we've called feature and bc policy breaking. We (believe that) we've found a way to fix the bug part without changing the previous behavior on the web shop.
Commits
-------
854e3e7ceb Add Behat scenarios for continuing cart from web in api
fb70c5e34a Fix being unable to pick up latest non-empty cart started in shop and continued in API
1e3410a72b Rename custom Order factory
efdbb44594 Rename composite to hybrid within Behats & post review improvements
* 1.11:
[Promotion] Revert removing min and max validation messages for code length
[Behat] Add minor improvements to range validations fixes
Set correct notInRangeMessage for unit percentage discount promotion action
Set correct notInRangeMessage for coupon generation validation
This PR was merged into the 1.11 branch.
Discussion
----------
| Q | A |
|-----------------|--------------------------------------------------------------|
| Branch? | 1.11 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | yes |
| Related tickets | fixes#13883 |
| License | MIT |
**Issue**
Symfony validation constraint [`Range`](https://symfony.com/doc/4.4/reference/constraints/Range.html#notinrangemessage) instroduced new behavior since 4.4 release -- if both `min` and `max` options are defined, then `notInRangeMessage` will be shown and `minMessage`/`maxMessage` will be disregarded.
<details><summary>Example</summary>
If you will try to generate coupons for promotion with code length larger than 40, then you will see symfony standard message `notInRangeMessage: This value should be between {{ min }} and {{ max }}.` instead of sylius `maxMessage: Coupon code must not be longer than {{ limit }} characters.`

</details>
#### Case 1
9506c80f20/src/Sylius/Bundle/PromotionBundle/Resources/config/validation/PromotionCouponGeneratorInstruction.xml (L33-L37)
- [x] Remove minMessage, maxMessage and their translations
- [x] Introduce notInRangeMessage and new translation
- [x] Cover case with behat scenario
#### Case 2
9506c80f20/src/Sylius/Bundle/PromotionBundle/Form/Type/Action/UnitPercentageDiscountConfigurationType.php (L35-L41)
- [x] Remove minMessage, maxMessage usage; Their translations were already removed.
- [x] Introduce notInRangeMessage; Translation already exists as it's shared between order/item percentage discount
- [x] Cover case with behat scenario
#### Case 3
9506c80f20/src/Sylius/Bundle/ApiBundle/Resources/config/validation/AddProductReview.xml (L23-L28)
- [x] Remove minMessage, maxMessage
- [x] Rename translation key `range` to `not_in_range`
- [x] Move to separate https://github.com/Sylius/Sylius/pull/14584 due deprecation.
**Questions**
1. Does removal of `sylius.promotion_coupon_generator_instruction.code_length.min` and `...max` messages constitute a deprecation entry? Because those translation strings were inactive (effectively deprecated by symfony upgrade) since project was upgraded to symfony 4.4 and even if somebody has custom translation over there, it has no effect whatsoever.
2. Please advise on adding/removal of translation strings, do I need to do anything else? I do recall some translation service was in use.
Commits
-------
f1ae3df84d Set correct notInRangeMessage for coupon generation validation
f55babdb58 Set correct notInRangeMessage for unit percentage discount promotion action
7d88a38986 [Behat] Add minor improvements to range validations fixes
63e8b69f6c [Promotion] Revert removing min and max validation messages for code length
* 1.11:
[Behat] Fix return type of cart transformer
[Behat] Fix problem with duplicated step in cart contexts
[Behat][Admin] Cover trying to show cart in the admin panel
Changing the naming of the order function
Throwing a not found when order is still a cart
This PR was merged into the 1.11 branch.
Discussion
----------
| Q | A |
|-----------------|--------------------------------------------------------------|
| Branch? | 1.11 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Related tickets | down ported version of https://github.com/Sylius/Sylius/pull/13831, fixes https://github.com/Sylius/Sylius/issues/13826 |
| License | MIT |
<!--
- Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible)
- Features and deprecations must be submitted against the master 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
-->
Commits
-------
8b66199933 Throwing a not found when order is still a cart
If the order is in state cart the order show should not throw a 500.
095d5c90a2 Changing the naming of the order function
ea87cabc26 [Behat][Admin] Cover trying to show cart in the admin panel
deddc31da6 [Behat] Fix problem with duplicated step in cart contexts
ba8f290948 [Behat] Fix return type of cart transformer
This PR was merged into the 1.11 branch.
Discussion
----------
| Q | A |
|-----------------|--------------------------------------------------------------|
| Branch? | 1.11 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Related tickets | fixes#11570 |
| License | MIT |
Bug :
Select attributes on product edit page in BO are not translated.
Fix :
Get locale from context and translate with this locale.
<!--
- Bug fixes must be submitted against the 1.11 branch
- Features and deprecations must be submitted against the 1.12 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
-->
Commits
-------
73dc8a9af9 [Product] Fixed product attribute translations #115709670a1c6a7 [Product] Always translate attribute label
0ccdbf69c5 [Behat][Product] Tests of adding select attributes
* 1.11:
[Behat][ProductAssociation] Improve the readability of the background steps
[ProductAssociation] Clean up ProductAssociationRepository
[ProductAssociation] Show enabled associated products only
[Behat][ProductAssociation] Add scenario for viewing enabled associated products only
[ProductAssociation] Show product associations within current channel only
[Behat][ProductAssociation] Add scenario for viewing product associations within current channel
This PR was merged into the 1.11 branch.
Discussion
----------
| Q | A |
|-----------------|--------------------------------------------------------------|
| Branch? | 1.11|
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no|
| Related tickets | after https://github.com/Sylius/Sylius/pull/14155|
| License | MIT |
<!--
- Bug fixes must be submitted against the 1.11 or 1.12 branch
- Features and deprecations must be submitted against the 1.13 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
-->
Commits
-------
19db727efd [Behat][API] Add missing channels suite to imports
* 1.11:
Fixes the descending order scenarios
Added correct tags to all scenarios
Added more sorting scenarios
Only join channel pricings for the current channel
Added Behat scenario to reproduce the issue
This PR was merged into the 1.11 branch.
Discussion
----------
| Q | A |
|-----------------|--------------------------------------------------------------|
| Branch? | 1.11 |
| Bug fix? | yes |
| New feature? | no|
| BC breaks? | no |
| Deprecations? | no <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | https://github.com/Sylius/Sylius/issues/14487 |
| License | MIT |
<!--
- Bug fixes must be submitted against the 1.11 branch
- Features and deprecations must be submitted against the 1.12 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
-->
[Api] Sorting products by price should be channel specific. Having a different price for the same product on another channel, should not affect the sorting on the current channel.
Commits
-------
eca1836ba1 Added Behat scenario to reproduce the issue
cc34b4ae43 Only join channel pricings for the current channel
d01136bba7 Added more sorting scenarios
b12adaa465 Added correct tags to all scenarios
4d6c12e020 Fixes the descending order scenarios