Commit graph

29978 commits

Author SHA1 Message Date
Jakub Tobiasz
39340f9001
Resolve conflicts between 1.12 and 1.13 2023-07-11 13:58:44 +02:00
Kamil Grygierzec
4111c1017a
bug #15154 Add a conflict for "stof/doctrine-extensions-bundle": "1.8.0" (jakubtobiasz)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT


Commits
-------

210754fe1a Add a conflict for "stof/doctrine-extensions-bundle": "1.8.0"
2023-07-11 12:00:11 +02:00
Jakub Tobiasz
210754fe1a
Add a conflict for "stof/doctrine-extensions-bundle": "1.8.0" 2023-07-10 16:28:11 +02:00
Sylius Bot
da94d80e76 [CS][DX] Refactor 2023-07-10 15:09:54 +02:00
Sylius Bot
b7644427b9 [CS][DX] Refactor 2023-07-10 15:09:41 +02:00
Grzegorz Sadowski
7035db1945
Merge branch '1.12' into 1.13
* 1.12:
  Refactor to provide a product translation instead of generate product shop url
  Provide post-CR fixes
  Allow passing a desired locale code to DefaultChannelFactory
  Remove unknown localeCode named paramter
  Add support for secure and unsecured URLs for generating product show page
  Refactor logic behind a button redirecting to the product's shop page
  Adding try logic to get the shop's slug
  Adding default if product has no slug
  [Bunnyshell] Adjust the workflows for Fork PRs
  [Maintenance] Improve ProportionalIntegerDistributor to keep original index
2023-07-07 11:20:44 +02:00
Kamil Grygierzec
00525c46e5
bug #15139 Fix "Show product in the shop page" button (mamazu, jakubtobiasz, GSadee)
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 | replaces #14663
| License         | MIT


Commits
-------

d24183f65b Adding default if product has no slug
98d853eb13 Adding try logic to get the shop's slug
9856b1e62f Refactor logic behind a button redirecting to the product's shop page
a394383457 Add support for secure and unsecured URLs for generating product show page
60000de780 Remove unknown localeCode named paramter
bfb011d84e Allow passing a desired locale code to DefaultChannelFactory
cf86d245b6 Provide post-CR fixes
ae721b5bd4 Refactor to provide a product translation instead of generate product shop url
2023-07-07 10:46:46 +02:00
Grzegorz Sadowski
ae721b5bd4
Refactor to provide a product translation instead of generate product shop url 2023-07-07 07:26:55 +02:00
Jakub Tobiasz
cf86d245b6
Provide post-CR fixes 2023-07-07 07:15:11 +02:00
Jakub Tobiasz
bfb011d84e
Allow passing a desired locale code to DefaultChannelFactory 2023-07-07 07:15:11 +02:00
Jakub Tobiasz
60000de780
Remove unknown localeCode named paramter 2023-07-07 07:15:11 +02:00
Jakub Tobiasz
a394383457
Add support for secure and unsecured URLs for generating product show page 2023-07-07 07:15:11 +02:00
Jakub Tobiasz
9856b1e62f
Refactor logic behind a button redirecting to the product's shop page 2023-07-07 07:15:10 +02:00
mamazu
98d853eb13
Adding try logic to get the shop's slug 2023-07-07 07:15:10 +02:00
mamazu
d24183f65b
Adding default if product has no slug 2023-07-07 07:15:10 +02:00
Jan Goralski
3392cc6610 [Maintenance] Improve ProportionalIntegerDistributor to keep original index 2023-07-07 07:08:34 +02:00
Rafał Jaskulski
f6087751fb
minor #15145 [Bunnyshell] Adjust the workflows for Fork PRs (jakubtobiasz)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT

CI fails on branches based on `1.12.` as there's no `.bunnyshell` dir on `1.12`.

Commits
-------
  [Bunnyshell] Adjust the workflows for Fork PRs
2023-07-06 14:01:13 +02:00
Aris Buzachis
1a5b08e8c8
[Bunnyshell] Adjust the workflows for Fork PRs
Signed-off-by: Aris Buzachis <aris.buzachis@bunnyshell.com>
2023-07-06 09:19:45 +02:00
Jacob Tobiasz
9d91f40975
minor #15137 [Maintenance] Improve ProportionalIntegerDistributor to keep original index (NoResponseMate)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 |
| Bug fix?        | somewhat                                                     |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | - |
| License         | MIT                                                          |

Commits
-------
  [Maintenance] Improve ProportionalIntegerDistributor to keep original index
2023-07-05 16:33:27 +02:00
Jacob Tobiasz
6574d61700
refactor #15143 Upmerge adjustments (Rafikooo)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 <!-- see the comment below -->                  |
| Bug fix?        | no                                                      |
| New feature?    | no                                                      |
| BC breaks?      | no                                                      |
| Deprecations?   | no <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | https://github.com/Sylius/Sylius/pull/15064
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 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
-------
  [PHPStan] Add missing @param annotations
  [ECS] Apply ecs fixes
  [Units] Adjust checkout completion responses
2023-07-05 16:32:35 +02:00
Jan Goralski
62da32e755
[Maintenance] Improve ProportionalIntegerDistributor to keep original index 2023-07-05 14:49:36 +02:00
Rafikooo
7c4dbd85c0
[Units] Adjust checkout completion responses 2023-07-05 13:25:57 +02:00
Rafikooo
6e523912ce
[ECS] Apply ecs fixes 2023-07-05 13:15:29 +02:00
Rafikooo
4ecc55a861
[PHPStan] Add missing @param annotations 2023-07-05 13:14:58 +02:00
Grzegorz Sadowski
1d46d40031
Merge branch '1.12' into 1.13
* 1.12:
  [PostgreSQL] Handle DriverException gracefully with 22P02 SQLState
  [Orders][Shop] Improve order item quantity change validation
  [Unit][Orders] Add tests for items quantity change
  [Orders][Shop] Add checkout completion validation
  [Unit][Orders] Add tests for checkout completion
  [Unit][Orders] Add tests for preventing from order completion
  [Orders][Shop] Add shipment validation when trying to assign shipping method
  [Unit][Orders] Add test for validating shipmentId when trying to assign shipping method
  [Unit][Utils] Introduce ContentType helper class
  [Orders] Add missing order payment configuration endpoint validation
  [Unit][Orders][Shop] Add test for validation invalid payment param
  [Unit][Orders][Shop] Add test for invalid uri param validation
  [Unit][Orders][Shop] Extract helper methods
2023-07-05 10:07:11 +02:00
Grzegorz Sadowski
6f6fe74d20
bug #15064 [Orders][API] Validate endpoints (Rafikooo)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 and 1.13 <!-- see the comment below -->                  |
| 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/14764                      |
| License         | MIT                                                          |

We are missing validation of the order checkout process and some URI parameters across order endpoints

<!--
 - Bug fixes must be submitted against the 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
-------

4bfbb8e38e [Unit][Orders][Shop] Extract helper methods
8363d0d3c3 [Unit][Orders][Shop] Add test for invalid uri param validation
500bf9479e [Unit][Orders][Shop] Add test for validation invalid payment param
0d37303cc4 [Orders] Add missing order payment configuration endpoint validation
7f36b7e3fb [Unit][Utils] Introduce ContentType helper class
5161355453 [Unit][Orders] Add test for validating shipmentId when trying to assign shipping method
5dc183e1b1 [Orders][Shop] Add shipment validation when trying to assign shipping method
a5f7c232dd [Unit][Orders] Add tests for preventing from order completion
8606840507 [Unit][Orders] Add tests for checkout completion
f9e83a7543 [Orders][Shop] Add checkout completion validation
0268c02a7f [Unit][Orders] Add tests for items quantity change
020cc54064 [Orders][Shop] Improve order item quantity change validation
b234f36de6 [PostgreSQL] Handle DriverException gracefully with 22P02 SQLState
2023-07-05 08:53:42 +02:00
Jacob Tobiasz
3e97ca44eb
[UPMERGE] 1.12 -> 1.13 (#15142) 2023-07-04 16:37:13 +02:00
Jakub Tobiasz
f950ec2e4c
Fix CI after the upmerge 2023-07-04 15:09:31 +02:00
Jakub Tobiasz
9701a7b4d9
Resolve conflicts between 1.12 and 1.13 2023-07-04 15:01:06 +02:00
Kamil Grygierzec
816baef8a5
bug #13824 Calculate tax with decimal precision and distribute proportionally across order items (vvasiloi, GSadee, TheMilek)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | master
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

Attempt to solve the issue of decimal values being lost during tax calculation on item level which leads to a wrong tax total at the order level.

Issue reported by @ikamikaz3 via Slack ([full thread](https://sylius-devs.slack.com/archives/C3EGDG9LY/p1648827780599519)): 
![image](https://user-images.githubusercontent.com/7114562/161611854-734113d7-52a7-4b82-92b8-0031c6e7a120.png)

Commits
-------

65b720e8b9 Calculate tax with decimal precision and distribute proportionally across order items
0921db1b03 [Behat] Add scenarios for calculating tax with decimal precision for multiple items
9bf7d8e259 [Taxation] Fix service definition of DecimalCalculator
1cdca39e5c Add new distributing logic to OrderItemsTaxesApplicator optional
b3caf45aa4 [Documentation] Add info about new decimal tax calculator to docs
dea2fb8406 Prevent iterating over non-existent indexes
25b270fa8c Improve iterating over items and units during taxes application
a43f92d199 Extract checking items quantities before calculations in OrderItemsTaxesApplicator
a4af0f8897 Add missing spec for OrderItemsTaxesApplicator
2023-07-04 11:00:43 +02:00
Jacob Tobiasz
ed88fba133
minor #15138 [Bunnyshell] Adjust the workflows for Fork PRs (aris-bunnyshell)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13                 |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets |                  |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 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
-------
  [Bunnyshell] Adjust the workflows for Fork PRs
2023-07-04 08:41:50 +02:00
Grzegorz Sadowski
b8b5928149
refactor #15072 [API] Validate endpoints that uses commands (Rafikooo)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 <!-- 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                                                          |

Endpoints that dispatches commands, do not have proper validation and expose business logic. This PR solves it with a validator.

Before:
<img width="1727" alt="image" src="https://github.com/Sylius/Sylius/assets/40125720/c61ce5f5-ab45-4e28-a27c-d37bfa45c288">

After:
<img width="1435" alt="image" src="https://github.com/Sylius/Sylius/assets/40125720/6a71fe62-880a-4e0a-84b3-28aea812ffe2">


<!--
 - Bug fixes must be submitted against the 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
-------

b644746561 [Unit][ProductReviews] Add contract test for POST review payload validation
6f6bf56a4d [API][ProductReview] Validate product field
09a5b65424 [API] Change the constructor signature of the AddProductReview command
84669f413b [Unit][Orders] Add tests for adding items to the cart validation
2876f9ba43 [API] Change the constructor signature of the AddItemToCart command
8b1dce2e4b [API][Orders] Validate adding items to the cart
a6df3c94a9 [Maintenance] Use property promotion in commands
aafc207537 [Unit][Orders] Add test for changing item quantity of the cart
0ab079e14e [API] Change ChangeItemQuantityInCart command methods signatures
200ea9e3e6 [API][Orders] Validate item quantity change
2023-07-04 07:36:35 +02:00
Grzegorz Sadowski
142e94bb70
refactor #15132 Add joins on the orders list query builder conditionally (jakubtobiasz)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13
| Bug fix?        | no/
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | closes #14781
| License         | MIT


Commits
-------

84738dde94 Add joins on the orders list conditionally
6bb765d7c6 Fix broken displaying customer's orders in the admin panel
2023-07-04 07:21:25 +02:00
Rafikooo
200ea9e3e6
[API][Orders] Validate item quantity change 2023-07-03 12:41:38 +02:00
Rafikooo
0ab079e14e
[API] Change ChangeItemQuantityInCart command methods signatures 2023-07-03 10:53:24 +02:00
Rafikooo
aafc207537
[Unit][Orders] Add test for changing item quantity of the cart 2023-07-03 10:53:24 +02:00
Rafikooo
a6df3c94a9
[Maintenance] Use property promotion in commands 2023-07-03 10:53:24 +02:00
Rafikooo
8b1dce2e4b
[API][Orders] Validate adding items to the cart 2023-07-03 10:53:24 +02:00
Rafikooo
2876f9ba43
[API] Change the constructor signature of the AddItemToCart command 2023-07-03 10:53:24 +02:00
Rafikooo
84669f413b
[Unit][Orders] Add tests for adding items to the cart validation 2023-07-03 10:53:24 +02:00
Rafikooo
09a5b65424
[API] Change the constructor signature of the AddProductReview command 2023-07-03 10:53:24 +02:00
Rafikooo
6f6bf56a4d
[API][ProductReview] Validate product field 2023-07-03 10:53:24 +02:00
Rafikooo
b644746561
[Unit][ProductReviews] Add contract test for POST review payload validation 2023-07-03 10:53:23 +02:00
Sylius Bot
3cfacbeb10 [CS][DX] Refactor 2023-07-03 07:45:25 +02:00
Grzegorz Sadowski
a4af0f8897
Add missing spec for OrderItemsTaxesApplicator 2023-06-30 14:51:03 +02:00
Grzegorz Sadowski
a43f92d199
Extract checking items quantities before calculations in OrderItemsTaxesApplicator 2023-06-30 13:36:30 +02:00
Jakub Tobiasz
6bb765d7c6
Fix broken displaying customer's orders in the admin panel 2023-06-30 13:33:28 +02:00
Jakub Tobiasz
84738dde94
Add joins on the orders list conditionally 2023-06-30 13:33:28 +02:00
Grzegorz Sadowski
25b270fa8c
Improve iterating over items and units during taxes application 2023-06-30 13:23:01 +02:00
TheMilek
dea2fb8406
Prevent iterating over non-existent indexes 2023-06-30 13:23:01 +02:00