Commit graph

27148 commits

Author SHA1 Message Date
Kayue Yeung
981951509a Disassociate OrderItemUnit from all shipments before removal 2022-12-16 11:44:01 +01:00
Grzegorz Sadowski
75ade84fec
minor #14645 Move Upgrade API from 1.11.11 to 1.11.12 section to the top of file (jakubtobiasz)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11                  |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | -                     |
| License         | MIT                                                          |

"Implementing" suggestion from @GSadee.


Commits
-------

28a469e459 Move Upgrade API from 1.11.11 to 1.11.12 section to the top of file
2022-12-15 14:37:31 +01:00
Jakub Tobiasz
28a469e459
Move Upgrade API from 1.11.11 to 1.11.12 section to the top of file 2022-12-15 09:58:39 +01:00
Grzegorz Sadowski
df922cdb81
bug #14642 Fix invalid API errors normalization (jakubtobiasz)
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 | fixes #14391                      |
| License         | MIT                                                          |

So far, on production environment when any non-validation related error occurred, the `FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler` was used, even on API Platform endpoints. Now, depending on the path of the request, the `FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler` or `ApiPlatform\Hydra\Serializer\ErrorNormalizer` is used.


Commits
-------

1203a7a36c Fix invalid API errors normalization
af04cc897d Fix wrong API's errors normalizer
2022-12-15 08:58:08 +01:00
Grzegorz Sadowski
fc062a269b
bug #14580 [Enchancement] Optimize memory usage by sylius:remove-expired-carts command (jakubtobiasz)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11                  |
| Bug fix?        | I consider memory leaking as a bug                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets |                       |
| License         | MIT                                                          |

This PR focus on optimization, not changing the observable behavior, so it doesn't touch command itself, only the service. Moreover, I would like to thank @vvasiloi for helping with this enhancement. The idea of output changes can be implemented (like in Victor's POC #14569), but I believe it should be done later, and in a separate PR.

![image](https://user-images.githubusercontent.com/80641364/204011380-7c01b23e-bb45-424b-b4e8-f9dfa9cdcc62.png)


Commits
-------

cf7e29b4f8 Optimize memory usage by sylius:remove-expired-carts command
f88b9fdfe2 Merge branch '1.11' into maintenance/optimize-carts-removing
c8100505e2 Change a default value of limit in findCartsNotModifiedSince to null
2022-12-15 07:52:20 +01:00
Jakub Tobiasz
af04cc897d
Fix wrong API's errors normalizer 2022-12-15 06:43:00 +01:00
Jakub Tobiasz
1203a7a36c
Fix invalid API errors normalization 2022-12-14 15:48:10 +01:00
Jakub Tobiasz
c8100505e2
Change a default value of limit in findCartsNotModifiedSince to null 2022-12-14 15:01:23 +01:00
Grzegorz Sadowski
207b696790
minor #14575 [DX] Add EditorConfig for test API responses (coldic3)
This PR was merged into the 1.11 branch.

Discussion
----------

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

EditorConfig from the root directory forces us to use 2 indents but in tests, we use 4 instead.

Commits
-------

7748c854f5 [DX] Add .editorconfig for test API responses
2022-12-13 13:48:46 +01:00
Grzegorz Sadowski
be657ba886
bug #14525 Adding skipIf for migrations to allow future runs when they should apply (stefantalen)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11 <!-- see the comment below -->                  |
| Bug fix?        | yes                                                       |
| 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.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
-->
While upgrading to Sylius 1.11 I came across this issue where these migrations were executed but I hadn't set the `MESSENGER_TRANSPORT_DSN` environment variable yet.

This resulted in a diff on my database after I added the variable.

By using the `skipIf()` for these migrations will not be executed, it will just give a notice:

```
[notice] Migration Sylius\Bundle\CoreBundle\Migrations\Version20220203115813 skipped during Execution. Reason: "MESSENGER_TRANSPORT_DSN was not found or is not using Doctrine"
[notice] Migration Sylius\Bundle\CoreBundle\Migrations\Version20220407131547 skipped during Execution. Reason: "messenger_messages table was not found"
```
They keep getting skipped on future runs, however when you add the environment variable they will be executed and only then.

Commits
-------

b60b6190f4 Adding skipIf for migrations to allow future runs when they should apply
2022-12-13 13:38:34 +01:00
Grzegorz Sadowski
b4dd222c20
bug #14289 [Api] Change int to integer in ProductVariant and ShippingMethod documentation normalizers ()
This PR was merged into the 1.11 branch.

Discussion
----------

In the `ProductVariantDocumentationNormalizer`, the `price` and `originalPrice` properties have a manual configuration pushed to the array. In this config, `type` is defined as `int`. The issue here is that `int` is not a valid OpenApi data type. 

The same issue occurs with the `price` property in `ShippingMethodDocumentationNormalizer`.  

This fix simply changes `int` to `integer` for the above three properties. 

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11             |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                     |
| BC breaks?      | no                                                     |
| Deprecations?   | no |
| Related tickets |                   |
| 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
-->


Commits
-------

c7c0bf2b7f [Api] Change int to integer in ProductVariant and ShippingMethod documentation normalizers
2022-12-13 13:30:03 +01:00
Mateusz Zalewski
17b620e63a
bug #12099 Make link buttons with confirmation modal work again (stefandoorn)
This PR was merged into the 1.11 branch.

Discussion
----------

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

When trying to add a confirmation modal to a link button (`<a href..`) it didn't do anything when clicking the confirmation button inside the modal. It seems that the confirmation button (which is actually a div) gets a href set, but I don't discover (also not in the Semantic UI docs) that that is actually a functionality. 

Commits
-------

f194e516cc Make link buttons with confirmation modal work again
2022-12-13 12:45:35 +01:00
Grzegorz Sadowski
02318ff0e4
bug #13207 Changing replacement interface as previous one does not exist (Roshyo)
This PR was merged into the 1.11 branch.

Discussion
----------

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

A small change for a big benefit (I've been looking for the mentioned class for 10 minutes 😆 )

Commits
-------

3adafee82f Changing replacement interface as previous one does not exist
2022-12-13 12:42:46 +01:00
Stefan Doorn
f194e516cc
Make link buttons with confirmation modal work again 2022-12-13 10:30:09 +01:00
Grzegorz Sadowski
b09822d337
refactor #14605 [CS][DX] Refactor ()
This PR was merged into the 1.11 branch.

Discussion
----------

This PR has been generated automatically.
For more details see [refactor.yml](/Sylius/Sylius/blob/1.12/.github/workflows/refactor.yml).

Commits
-------

52f83d4c94 [CS][DX] Refactor
2022-12-13 08:58:12 +01:00
Grzegorz Sadowski
fe68cfc3bd
bug #14634 [API] Fix ProductVariantNormalizer exception catching (NoResponseMate)
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 #13099                      |
| License         | MIT                                                          |

Commits
-------

0f55f70b1f [API] Fix ProductVariantNormalizer exception catching
2022-12-12 12:21:37 +01:00
Rafał Jaskulski
6d67ea4b44
bug #14608 [UI][Shop][Cart] Reset chosen options on refresh in firefox (NoResponseMate)
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 #13158                      |
| License         | MIT                                                          |

Forced resetting selected values on the product page when reloading the page.

Commits
-------

e9693f23ac [Shop][Cart] Reset chosen options on refresh in firefox
2022-12-12 09:57:32 +01:00
Sylius Bot
52f83d4c94 [CS][DX] Refactor 2022-12-12 02:30:40 +00:00
Łukasz Chruściel
03d6f03a5b
feature #13820 [Doc] Add depth to theme configuration (Nek-)
This PR was merged into the 1.11 branch.

Discussion
----------

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

Just a little documentation improvement

Commits
-------

60df9f2452 Add depth to theme configuration
2022-12-10 22:50:46 +01:00
Jan Goralski
0f55f70b1f
[API] Fix ProductVariantNormalizer exception catching 2022-12-09 14:40:08 +01:00
Rafał Jaskulski
da30de9a5c
minor #14633 [Documentation] Remove Sylius 1.12 scope from the release cycle page (GSadee)
This PR was merged into the 1.11 branch.

Discussion
----------

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

I believe that the planned scope of Sylius 1.12 is not needed anymore, as this version has already been released 😃 

<!--
 - 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
-------

47bbe65727 [Documentation] Remove Sylius 1.12 scope from the release cycle page
2022-12-09 11:57:18 +01:00
Rafał Jaskulski
15ad0e73b2
minor #14632 [Documentation] Extend the maintenance period of Sylius 1.11 by one month (GSadee)
This PR was merged into the 1.11 branch.

Discussion
----------

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

I would like to like to extend the maintenance period of Sylius 1.11 by one month and postpone the end of maintenance until the end of January. Why? I believe that we should keep two versions of Sylius running at the same time for longer than just two months, as we have generally done in the past. Besides, releasing the last version of 1.11 and ending support just after the New Year is probably not the best date 😅 .

<!--
 - 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
-------

ed481dd6d1 [Documentation] Extend the maintenance date of Sylius 1.11
2022-12-09 11:47:08 +01:00
Grzegorz Sadowski
47bbe65727
[Documentation] Remove Sylius 1.12 scope from the release cycle page 2022-12-09 10:34:13 +01:00
Grzegorz Sadowski
ed481dd6d1
[Documentation] Extend the maintenance date of Sylius 1.11 2022-12-09 10:25:29 +01:00
Mateusz Zalewski
e7616205ca
minor #14619 Update catalog_promotions.rst (Xusifob)
This PR was merged into the 1.11 branch.

Discussion
----------

The configurations for scopes taxons & variants seems to be inversed

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




Commits
-------

bab0f21162 Update catalog_promotions.rst
2022-12-08 15:54:48 +01:00
Grzegorz Sadowski
aedf4e2035
Change application's version to v1.11.12-dev 2022-12-08 14:16:23 +01:00
Grzegorz Sadowski
614d15528e
Generate changelog for v1.11.11 2022-12-08 14:15:08 +01:00
Grzegorz Sadowski
1648f4758f
Change application's version to v1.11.11 2022-12-08 14:15:06 +01:00
Jan Goralski
e9693f23ac
[Shop][Cart] Reset chosen options on refresh in firefox 2022-12-08 13:09:36 +01:00
Bastien Malahieude
bab0f21162
Update catalog_promotions.rst
The configurations for scopes taxons & variants seems to be inversed
2022-12-08 11:56:17 +01:00
Jakub Tobiasz
f88b9fdfe2
Merge branch '1.11' into maintenance/optimize-carts-removing 2022-12-08 10:13:23 +01:00
Grzegorz Sadowski
603b1217fc
bug #14596 [Orders] Cart not found for registered user (Rafikooo)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11 <!-- 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 | fixes https://github.com/Sylius/Sylius/issues/13106 and https://github.com/Sylius/Sylius/issues/14456
| 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
-------

d1cc47930e [API] Fetching an order created by guest with an email already existed
1428136e3b [Cart] Fix creating an order as a guest while logged in as a customer
2022-12-08 08:10:21 +01:00
Grzegorz Sadowski
4c9b8f9e62
bug #14486 [Cart] Set the created_by_guest flag as false if the cart was created by a customer authenticated via access token (nicolalazzaro)
This PR was merged into the 1.11 branch.

Discussion
----------

[Cart] Set the created_by_guest flag as false if the cart was created by a customer authenticated via access token

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11 <!-- 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 | fixes #14456                      |
| 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
-->


Commits
-------

e2f30ed99a [Cart] Set the created_by_guest flag as false if the cart was created by a customer authenticated via access token
2022-12-08 07:51:13 +01:00
Grzegorz Sadowski
35b642f94c
bug #14600 [ProductAssociation] Show product associations within current channel only (coldic3)
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 https://github.com/Sylius/Sylius/issues/14564                      |
| License         | MIT                                                          |

Commits
-------

be0da06953 [Behat][ProductAssociation] Add scenario for viewing product associations within current channel
09ad1a2d6f [ProductAssociation] Show product associations within current channel only
2dacda28b2 [Behat][ProductAssociation] Add scenario for viewing enabled associated products only
997e72d9dc [ProductAssociation] Show enabled associated products only
c4cf039b5f [ProductAssociation] Clean up ProductAssociationRepository
6a7b45348e [Behat][ProductAssociation] Improve the readability of the background steps
2022-12-08 07:21:17 +01:00
Mateusz Zalewski
4ad6e1ac58
minor #14602 [GitHub Actions] Restrict "Refactor" workflow to Sylius/Sylius repo (coldic3)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11                 |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | mentioned in https://github.com/Sylius/Sylius/pull/14585#issuecomment-1329101346                      |
| License         | MIT                                                          |


Commits
-------

3d968ec [GitHub Actions] Restrict "Refactor" workflow to Sylius/Sylius repo
2022-12-07 15:39:36 +01:00
Mateusz Zalewski
935ea4e905
bug #14618 Use MakerBundle instead of SensioGeneratorBundle (hmonglee)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12                 |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets |                       |
| 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
-------

600850cf32 Use MakerBundle instead of SensioGeneratorBundle
2022-12-07 15:36:06 +01:00
Kevin Kaniaburka
3d968ecd68
[GitHub Actions] Restrict "Refactor" workflow to Sylius/Sylius repo 2022-12-07 14:26:31 +01:00
Kevin Kaniaburka
6a7b45348e
[Behat][ProductAssociation] Improve the readability of the background steps 2022-12-07 12:33:48 +01:00
Kevin Kaniaburka
c4cf039b5f
[ProductAssociation] Clean up ProductAssociationRepository 2022-12-07 12:04:16 +01:00
hmonglee
600850cf32
Use MakerBundle instead of SensioGeneratorBundle 2022-12-07 11:33:38 +01:00
Kevin Kaniaburka
997e72d9dc
[ProductAssociation] Show enabled associated products only 2022-12-06 15:40:20 +01:00
Kevin Kaniaburka
2dacda28b2
[Behat][ProductAssociation] Add scenario for viewing enabled associated products only 2022-12-06 15:40:20 +01:00
Kevin Kaniaburka
09ad1a2d6f
[ProductAssociation] Show product associations within current channel only 2022-12-06 15:40:20 +01:00
Kevin Kaniaburka
be0da06953
[Behat][ProductAssociation] Add scenario for viewing product associations within current channel 2022-12-06 15:40:20 +01:00
Rafikooo
1428136e3b
[Cart] Fix creating an order as a guest while logged in as a customer 2022-12-06 15:08:29 +01:00
Rafikooo
d1cc47930e
[API] Fetching an order created by guest with an email already existed 2022-12-06 15:08:29 +01:00
Rafał Jaskulski
b63df12d9c
minor #14574 [API] Fix missing address serialization for phone number and company name (andrehoffmann30, coldic3)
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 https://github.com/Sylius/Sylius/issues/13176                      |
| License         | MIT                                                          |

Commits
-------

b50abeab2d BUGFIX: #13176 add missing serialization configuration for phone number, company name
55b1b38d87 BUGFIX: #13175 move missing groups to defined attributes, remove duplication
97c70bcf39 TASK: #13176 add unit test for address update on order
1370a9c3f1 TASK: #13176 use put api route to update order billing address
15fa6c5378 BUGFIX: #13176 fix content type
d92fdf0b3a TASK: #13176 adjust serialization config and test
6181dee3d3 BUGFIX #13176 fix test
463c5eb112 [PHPUnit] Fix OrdersTest::it_allows_to_patch_orders_address
2022-12-06 14:35:26 +01:00
Kevin Kaniaburka
463c5eb112
[PHPUnit] Fix OrdersTest::it_allows_to_patch_orders_address 2022-12-06 09:23:24 +01:00
André Hoffmann
6181dee3d3
BUGFIX #13176 fix test 2022-12-06 09:23:24 +01:00
André Hoffmann
d92fdf0b3a
TASK: #13176 adjust serialization config and test 2022-12-06 09:23:24 +01:00